https://stackoverflow.com/questions/1373283
题
什么是C当量为C#Convert.ToInt16(String)方法的? 在我的情况,我的字符串是一个字符数组。 感谢
解决方案
您可以尝试的atoi 。
其他提示
使用的atoi 或与strtol。
int n = atoi(s)
也可以使用 sscanf的
sscanf("%i", myCharPointer, &myIntVar);