The standard way of converting between numbers and strings in C++11

In C++03 there was no standard way of converting numbers to strings. The best way to do that was using a std::stringstream: int n = 42; std::stringstream ss; ss << n; std::string s = ss.str(); One could put that into a more generic function that looks like this: template <typename T> std::string to_string(T const & … Read more