Re: atoi() check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, 28 Jan 2004, Liguo Song wrote:

> Deshpande Bansidhar(IFIN DC AI) wrote:
>
> >Hi all
> >
> >I have following code.
> >I want to add error handler for atoi() function.
> >
> >E.g.
> >
> >char *ch;
> >int num;
> >
> >/*Read ch here*/
> >
> >Num = atoi(ch);
   ^
   n
and
atoi() returns error when it fails, take the time to trap it.

HTH
-ishwar

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux