回复:(weishj)#include #include ...
我是用char*的TC没有string

Viva,espana!
2007-05-27 19:49
int a=0;
char* str=\"123\";
int b=strlen(str);
for(int i=0;i<b;i++)
a=a*10+((int)str[i])-48;
cout<<a;

2007-06-12 15:40

2007-06-12 17:07

[此贴子已经被作者于2007-6-12 19:55:35编辑过]

2007-06-12 19:43
2007-06-12 19:51
2007-06-12 19:54


太感谢你了,我在做作业,就字符型数组转化为整型这一步不会,快搞死我了,还好看到你的,感动啊

2013-05-11 16:03