CString转换成int
发布日期:2021-05-07 14:36:01 浏览次数:23 分类:原创文章

本文共 191 字,大约阅读时间需要 1 分钟。

一、int   i   =   atoi((LPCTSTR)CString);

二、

CString   str="100";  
  int   n=atoi(str.GetBuffer(str.GetLength()))

三、

int   i;  
  CString   strNum="1002020";  
  sscanf(   strNum.GetBuffer(strNum.GetLength()),"%d",   &i   );  
 

上一篇:int 转 CString
下一篇:MFC: RC 4005: PWR_FAIL:redefinition

发表评论

最新留言

感谢大佬
[***.8.128.20]2025年03月31日 23时41分58秒