#include<iostream>
using namespace std;
int main(){
char s[100]="123";
int a=atoi(s);//参数不可为字符
cout << a;
return 0;
}
OJ:字符串转化为int型
猜你喜欢
转载自blog.csdn.net/guomengkai/article/details/86760257
今日推荐
周排行