std::string sNumber = "123";
int number;
To convert int to std::string, you can convert int to char*, after that you can convert char* to std::string
To convert int to char*, you can be able to use this syntax
char str[10];
itoa(number,str,10); // 10 --> convert to 10 base
Không có nhận xét nào:
Đăng nhận xét