‘123’的字串怎樣得到123?

熱心網友

CString temp;int i;strcpy(temp,"123");i=atoi(temp);; //atoi()函數把字符串轉換為int整型 //當然長整型l = atol(temp);浮點(double) d = atof(temp);