Convert MFC CString to integer

后端 未结 11 2089
南旧
南旧 2020-12-08 13:15

How to convert a CString object to integer in MFC.

11条回答
  •  情歌与酒
    2020-12-08 14:03

    CString s;
    int i;
    i = _wtoi(s); // if you use wide charater formats
    i = _atoi(s); // otherwise
    

提交回复
热议问题