a question abou "atoi"
66650...@qq.com said:
int a;
char string[20]="12345";
atoi((a=string[2]-'0',"X"));
Yours,
Han from China
66650...@qq.com said:
First,thanks for all who have answered my last question.
>
>if char string[20]="12345";
>
>how could I convert the string[2](that is "3") to an int by using
>atoi? I only want to convert string[2],not other string[i].
>
>if char string[20]="12345";
>
>how could I convert the string[2](that is "3") to an int by using
>atoi? I only want to convert string[2],not other string[i].
char string[20]="12345";
atoi((a=string[2]-'0',"X"));
Yours,
Han from China
Comment