The C++11 version has introduced the std::stoi along with variants for each numeric type and the std::to_string which are the counterparts of the C atoi and itoa but are expressed in terms of std::string.
#include <string> std::string s =
So to answer your question, this is the shortest way I can think of. You could even try to omit naming the type, by using the auto keyword:
auto s = std::to_string(42);