我试图找出是否有一种在C中将字符串转换为整数的替代方法.
我经常在我的代码中模式化以下内容.
char s[] = "45"; int num = atoi(s);
那么,有更好的方式或其他方式吗?
c string atoi
atoi ×1
c ×1
string ×1