stdio.h - use cstdio
stdlib.h - use cstdlib
string.h - use cstring
If you use the cXXXX then you are using standard headers.
Printable View
stdio.h - use cstdio
stdlib.h - use cstdlib
string.h - use cstring
If you use the cXXXX then you are using standard headers.
Mm-hmm....yeah, you're right :)
also the atoi and itoa examples are the same.
If i'm wrong in thinking that atoi and itoa convert ascii to integer, and back, ignore this post.
Couldnt you just make a macro that adds or subtracts 48 from a number? That would be the most logical thing to do, im my thinking
No, you're not wrong. However, the macro approach will only work for a single character. itoa and atoi work with character arrays, for example you pass "54" to atoi, and it returns 54.
I see..... Im used to working in Brainf***, where that is the only way to do it. (adding or subtracting 48, that is)
This link is broken: http://www.strath.ac.uk/CC/Courses/N...ccourse.html