比如说CString strtemp = "22" ;
int i = 0 ;
现在怎么让  i = strtemp的22 啊?

解决方案 »

  1.   

    VC6里面不是有StrToInt 和 StrToIntEx  为什么都不能用啊?用这两个函数是不是要加载什么.h文件啊?
      

  2.   

    int atoi(
       const char *string 
    );http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_atof.2c_.atoi.2c_._atoi64.2c_.atol.asp
      

  3.   

    想使用StrToInt 和 StrToIntEx要在文件加上下面两句。 
    #include "shlwapi.h"
    #pragma comment(lib,"shlwapi.lib")所以说还是用atoi方便。