ToString

From Yefu's notes
Jump to: navigation, search
#include <sstream>

template <class T>
inline std::string to_string (const T& t)
{
std::stringstream ss;
ss << t;
return ss.str();
}