积少成多

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

c++11中提供了to_string函数,定义在string中,

重载了一大片,

        
std::string to_string( int value );
(1)    (since C++11)
std::string to_string( long value );
(2)    (since C++11)
std::string to_string( long long value );
(3)    (since C++11)
std::string to_string( unsigned value );
(4)    (since C++11)
std::string to_string( unsigned long value );
(5)    (since C++11)
std::string to_string( unsigned long long value );
(6)    (since C++11)
std::string to_string( float value );
(7)    (since C++11)
std::string to_string( double value );
(8)    (since C++11)
std::string to_string( long double value );

另外,标准库中string有一批函数,特别难用.

posted on 2016-06-23 10:23  x7b5g  阅读(384)  评论(0编辑  收藏  举报