[转载]C++ CString与int 互转

时间:2014-10-03 12:38:54   收藏:0   阅读:235

1.CString 转 int   
   
CString strtemp = "100";  
  
int  intResult;  
  
intResult= atoi(strtemp);  
  
-----------------------------------------------------------------  
  
2 int 转 CString   
  
   
CString strtemp;  
  
int i = 2334;     
strtemp.Format("%d",i); 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!