Convert MFC CString to integer

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

How to convert a CString object to integer in MFC.

11条回答
  •  不思量自难忘°
    2020-12-08 14:08

    A _ttoi function can convert CString to integer, both wide char and ansi char can work. Below is the details:

    CString str = _T("123");
    int i = _ttoi(str);
    

提交回复
热议问题