C++中cstring和int互换

来源:互联网 发布:centos mysql配置文件 编辑:程序博客网 时间:2024/06/05 15:02
CString str = _T("123");
int i = _ttoi(str); // Cstring 向 int 转换
=======================
int i = 123;CString str ;
str.Format(_T("%d"), i);// int 向Cstring 转换
vs 2010 试过了,可以转换。