-
this has nothing to do with Qt.
std::to_string
is C++11, you have to make sure you have a recent enough compiler and to enable C++11 features. If you use Qt Creator you should addCONFIG += c++11
in your .pro file and re-run qmakeAlternatively you can
#include <sstream>
and usestd::stringstream gstream; gstream << 4; std::string g=gstream.str();