发布网友
共1个回答
热心网友
char a[]="12345",*p;int s=0;for(p=a;*p!='\0';p++)s=10*s+*p-'0';//将“12345”转换成整形数字cout<<s;return 0;