This may be a stupid question but I have to ask, is there a greater advantage to printf other than formatting I should be aware of? That is there something deeper?
I belive you meant printf vs cout. And yes, there are 2 things. FIRST: type safety. Prinf uses va_args, which can't possibly be good. Cout uses nested speciallized operators, which can't possibly be bad. SECOND: overloads. You can NEVER make anything like
1 2 3 4 5 6 7 8 9 10 11
struct //whatever
{
//whatwhateverever
} whatwhatwhatevereverever;
int main()
{
//whatwhatwhat... well, you get the point :)
printf("%blah", whatwhatwhatevereverever);
//whatwhatwhawhat... OMG why am I even doing this?!?!!?
}
but overloading the stream insertion/extraction is easy!