方法一:
int i = atoi((LPCTSTR)CString);
方法二:
CString str="100";
int n=atoi(str.GetBuffer(str.GetLength()));
方法三:
sscanf也可以
本文介绍了将CString类型转换为int类型的三种实用方法,包括使用atoi函数的不同方式及sscanf函数的应用。
方法一:
int i = atoi((LPCTSTR)CString);
方法二:
CString str="100";
int n=atoi(str.GetBuffer(str.GetLength()));
方法三:
sscanf也可以
1339

被折叠的 条评论
为什么被折叠?