to_string이 c++ 11 표준이라서 NDK가 예전버전이면 빌드가 되지 않음
itoa는 c++ 비표준임 gcc에서 안돌아갈수 있음(android, ios에서 빌드가 안될수 있다는 얘기)
이왕이면 표준을 써보자
http://stackoverflow.com/questions/8770408/convert-int-to-char-in-standard-c-without-itoa
sprintf(str, "%d", a)
str = malloc(16);
snprintf(str, 16, "%d", a);
'C++' 카테고리의 다른 글
char* to int (0) | 2017.04.07 |
---|---|
rand (0) | 2017.02.20 |
cppcheck (0) | 2016.10.25 |
Winapi 그림판 색 고르기 (0) | 2016.06.23 |
rxcpp::observable<void, void>::create의 인스턴스가 없습니다. (0) | 2016.05.03 |