C++/C中字符转整数函数atoi C++描述C描述 C++描述 string &str; int a = atoi(str.c_str()); c_str()将string转换成字符 C描述 char* token; int a = atoi(token);