CString转换成int

一、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   );  
 

猜你喜欢

转载自blog.csdn.net/Vertira/article/details/107334189
今日推荐