Possible Duplicate:
Alternative to itoa() for converting integer to string C++?
I want to convert an int
variable to string
to put it in the textbox
.
I have tried this code:
int x = 123;
std::ostringstream osstream;
osstream << x;
std::string string_x = osstream.str();
But it doesn't work.