CString strTest = _T("2016"); int i = _ttoi(strTest); =============== int i = 2016; CString str ; str.Format(_T("%d"), i);