현재 cocos2d-x 3.4버전(ndk r10c)를 사용중인데
ios에서는 to_string사용이 가능하나
android빌드시 error: 'to_string' was not declared in this scope 에러를 뱉습니다.
ndk r10c에서는 to_string함수가 존재하지 않는듯 합니다.
다행히 cocos2d라이브러리 안에 아래의 주석코드가 있네요.
말대로 stringstream을 사용합시다.
// std::to_string is not supported on android, using std::stringstream instead.
string to_string(int value)
{
stringstream strStream;
strStream<<value;
return strStream.str();
}
위와 같이 사용을 해주시면 됩니다.
'Notes > R&D Notes' 카테고리의 다른 글
| 라즈베리파이 고정아이피 설정하기 (debian 리눅스 공통) (1) | 2016.01.31 |
|---|---|
| 라즈베리파이2 모델B 구매 및 설치 후기 (0) | 2016.01.31 |
| [c++11] std function으로 delegate(callback)구현하는 법 (0) | 2015.05.25 |
| 아이폰 개발 - In app purchase, store kit (0) | 2012.01.13 |
| 아이폰 개발 - resource, document폴더(접근가능한 폴더) (0) | 2012.01.09 |