int转string

方法:使用stringstream对象

1:首先要包含头文件#include <sstream>

2:  stringstream sret ;

  int ret = 0;

  sret<<ret;

     cout << sret.str().c_str()<< endl;

posted on 2012-04-09 17:16  sunliming  阅读(283)  评论(0编辑  收藏  举报