您的位置:首页 > 其它

!!! STL的string类如何实现CString的Format功能 这是一个经典问题,记住

2011-06-21 19:01 666 查看
STL的string类如何实现CString的Format功能?+STL中将int转换为string
这是一个经典问题,记住

#include<sstream>

std::CString itos(int arg)
{
std::ostringstream buffer;
buffer << arg; // send the int to the ostringstream
return buffer.str(); // capture the CString
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐