std::stoi (and variations for each numeric type) and std::to string, the C++11 equivalents of atoi and itoa, but stated in terms of std::string, are introduced.
std::string s = std::to_string(42);
As a result, this is the quickest route I can think of.
You may even use the auto keyword to avoid identifying the type.
auto s = std::to_string(42);