-2

Friends, I want to know how to convert an int value into a string value.

4

1 回答 1

3

Use std::to_string:

int i = 42;
std::string s = std::to_string(i);
于 2013-09-28T12:33:21.833 回答