70,035
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
char *a="-4568";
char *b="456";
int m,n;
m=atoi(a);
cout<<"m="<<m<<endl;
n=atoi(b);
cout<<"n="<<n<<endl;
system("pause");
return 0;
}
//结果:
m=-568
n=456