C语言风格函数
atoi与strtol对比:
string str = "16s"; int a = atoi(str.c_str()); int b = strtol(str.c_str(), nullptr, 10);
输出:
atoi的结果为:16<
京公网安备 11010502049817号