8
Duplicar posible:
int to std::string?convertir int a std :: string
Cómo se puede convertir int a std :: string?
Duplicar posible:
int to std::string?convertir int a std :: string
Cómo se puede convertir int a std :: string?
puede usar stringstream; robó esto desde here:
#include <iostream>
#include <sstream>
int main() {
int number = 123;
std::stringstream ss;
ss << number;
std::cout << ss.str() << endl;
}
Ver [INT para std :: string?] (http://stackoverflow.com/questions/893670/int-to-stdstring) –