飞夺泸定桥

我心飞扬

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
 使用stringstream类:(强烈推荐)

           #include <iostream>

           #include <sstream>   

          using namespace std;
    
            int main()
          {
             int i = 10;   
    
              stringstream   strstr;   
             strstr << i;   
    
             string str(strstr.str());   
    
             cout << "str = " << str << std::endl;   
            }

posted on 2011-05-30 21:11  飞夺泸定桥  阅读(552)  评论(0编辑  收藏  举报