S
Steve Gallagher
Can someone tell me (hopefully with a pointer to the appropriate place
in the Standard), what atoi() ought to do with the following:
int outp = 0;
outp = atoi("2+*&^%$#@!");
One school of thought on my team is that atoi() is supposed to
"grab the '2', convert it to 2, and basically just toss all that
'+*&^%$#@!' stuff." Another school of thought is that atoi() should
fail because the entire input was not convertiable to an int. Thanks
in advance for any assistance.
in the Standard), what atoi() ought to do with the following:
int outp = 0;
outp = atoi("2+*&^%$#@!");
One school of thought on my team is that atoi() is supposed to
"grab the '2', convert it to 2, and basically just toss all that
'+*&^%$#@!' stuff." Another school of thought is that atoi() should
fail because the entire input was not convertiable to an int. Thanks
in advance for any assistance.