atoi return



I have just read atoi() returns no errors. It returns an int though and
the value of the int is supposed to be the value of the conversion. It seems
to me that right there tells you if there was success or not. Am I wrong?

Bill


.



Relevant Pages

  • Re: Atoi keeps on failing.
    ... > int main ... in ] to effect this conversion: ... You could continue using 'atoi' but extract a 'char* from the string via: ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Writing a program to sort numbers - HELP!
    ... You may not have a choice but strtol is preferred to atoi and fgets is ... Then we using a sort function to sort the ... >int main ... probably meant *u and *v to dereference the pointers you received from ...
    (comp.lang.c.moderated)
  • Re: Check all errors in code?
    ... The atoi function converts the initial portion of the string ... pointed to by nptr to int representation. ... The atoi function returns the converted value. ... The strtol function returns the converted value, ...
    (comp.lang.c)
  • Re: question
    ... Vol is an int and tp_price is a double and I'm multiplying the two. ... You have only two language errors, the incorrect specifier in the printf call and lack of declaration for strtod and atoi. ... And the declaration of identifiers with a leading underscore, even in situations where perfectly legal, is a bad habit that can easily lead to illegal use. ... int main(int argc, char *argv) ...
    (comp.lang.c)
  • Re: C99 portability challenge
    ... int main ... Why should we dump atoi? ... All the atoxx functionality is covered by strtoxx functions. ... since the implementation is the same for char * and const char * arguments. ...
    (comp.std.c)