Re: a question abou "atoi"
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Thu, 30 Oct 2008 21:02:00 -0500
66650755@xxxxxx wrote:
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 charval;
...
charval = string[2] - '0';
all done.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
.
- Prev by Date: Re: A question about how to enter a very long number.
- Next by Date: Re: a question abou "atoi"
- Previous by thread: Re: a question abou "atoi"
- Next by thread: Re: a question abou "atoi"
- Index(es):
Relevant Pages
|