标签:logs 2.3 char 技巧 字符 ret log har atoi
31 char s[100]; 32 33 int main() { 34 strcpy(s, "123"); 35 cout << atoi(s) << endl; //atol同atoi 36 37 strcpy(s, "12.3"); 38 cout << atof(s) << endl; //没有atolf 39 40 strcpy(s, "12345678987654321"); 41 cout << atoll(s) << endl; 42 43 return 0; 44 }
标签:logs 2.3 char 技巧 字符 ret log har atoi
原文地址:http://www.cnblogs.com/baocong/p/6919182.html