Saturday, April 27, 2013

c++: convert to std::string

 

http://stackoverflow.com/a/332126

 

template <typename T>
std::string to_string(T const& value) {
stringstream sstr;
sstr << value;
return sstr.str();
}

No comments:

Post a Comment