ANSI UNICODE TCHAR
int atoi _wtoi _ttoi
long atol _wtol _ttol
double atof _wtof _ttof
示例
#include#include int main(){ using namespace std; CString oneHundred("100"); int i = _ttoi(oneHundred); cout << "i: " << i << endl; CString oneThousand("1000"); long l = _ttol(oneThousand); cout << "l: " << l << endl; CString doubleString("3.14159"); double d = _ttof(doubleString); cout << "d: " << d << endl; system("pause"); return 0;}
参考链接: