c++11中提供了to_string函数,定义在string中,
重载了一大片,
std::string to_string( int value );
() (since C++)
std::string to_string( long value );
() (since C++)
std::string to_string( long long value );
() (since C++)
std::string to_string( unsigned value );
() (since C++)
std::string to_string( unsigned long value );
() (since C++)
std::string to_string( unsigned long long value );
() (since C++)
std::string to_string( float value );
() (since C++)
std::string to_string( double value );
() (since C++)
std::string to_string( long double value );
另外,标准库中string有一批函数,特别难用.