cocos2d-x(c++) で、int(整数)をstring(文字列)に変換

cocos2d-x(c++) で、intをstring(文字列)に変換

環境 cocos2d-x 3.14(c++)

StringUtils::toString()で、int型からstring型に変換できる。

int hogeInt = 123;
string hogeStr = StringUtils::toString(hogeInt);

で、下記でもできるのですが、androidでビルドするとエラーになるので、
下記を使う場合はご注意を。


string hogeStr = std::to_string(123);