头文件 #include <string>
std::string to_string( int value ); std::string to_string( long value ); std::string to_string( long long value ); std::string to_string( unsigned value ); std::string to_string( unsigned long value ); std::string to_string( unsigned long long value ); std::string to_string( float value ); std::string to_string( double value ); std::string to_string( long double value );
std::string pi = "pi is " + std::to_string(3.1415926);