字符串变数字: 1:atoi函数 str.c_str()函数是为了将指针移到字符串首地址。 2:stoi函数 stoi(str,0,10):0 - 代表起始位置,10代表转换后的进制。在本题中用atoi,stoi再本题中会报错。