实现代码如下:

/************************************************************************/
/* int to string */
/************************************************************************/
std::string CCardDispatcher::ItoA(int n){
char ss[16]; //这个长度根据需要吧
sprintf(ss, "%d", n);
std::string s(ss);

return s;
}

以上就是【c++ int转string方法】的全部内容了,欢迎留言评论进行交流!

赞(0) 踩(0)

与本文相关的软件

发表我的评论

最新评论

  1. 暂无评论