(part 5) Han from China answers your C questions
- From: Borked Pseudo Mailed <nobody@xxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Oct 2008 19:30:10 -0600 (MDT)
a question abou "atoi"
66650...@xxxxxx 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].
int a;
char string[20]="12345";
atoi((a=string[2]-'0',"X"));
Yours,
Han from China
.
- Follow-Ups:
- Re: (part 5) Han from China answers your C questions
- From: Ben Bacarisse
- Re: (part 5) Han from China answers your C questions
- Prev by Date: Re: strcat with a string containing null in the middle
- Next by Date: Re: a question abou "atoi"
- Previous by thread: Han from China killfiles some people on CLC
- Next by thread: Re: (part 5) Han from China answers your C questions
- Index(es):