is cout more advansed than printf??????
syntax
precompiled header directive
undeclared identetive
multitasking
is cout more advansed than printf??????
missles on metriods
Since I learned C++ before C I'm accustomed to using cout! But I think with printf you don't need to type as much.
I am against the teaching of evolution in schools. I am also against widespread
literacy and the refrigeration of food.
this is an example ofCode:printfyou have to print *****more******thanCode:printf("hello world");Code:cout<<
missles on metriods
Actually when outputing variables I think printf is quicker with its %v's than cout with its << v's.
I am against the teaching of evolution in schools. I am also against widespread
literacy and the refrigeration of food.
If you're trying to learn C++, stick to the standard IO streams that C++ uses. You really should go read a book and stop asking trivial questions.
print( "Here is a number %d.", number);
cout << "Here is a number " << number << ".";
The benifit, as it were, of the new C++ streams is that you really don't have to implicitly set the type of all your variables to make them print right. You just stick the variable name in the argument line:
cout << a_number << a_string << a_float << a_char;
Whatever one you pick, don't mix and match them in the same program. (IE: don't use both printf and cout in the same program.) It makes your code ugly and is generally considered bad form.
Quzah.
Hope is the first step on the road to disappointment.
Apparently the same thing that's up with their sig.Originally posted by moi
wtf is up with that poll?
Quzah.
Hope is the first step on the road to disappointment.
WHAAAA???????????????????????
missles on metriods
What's multitasking got to do with printf and cout?
cout is more typesafe than printf
get gcc and heed the warning messages.Originally posted by Polymorphic OOP
cout is more typesafe than printf
hello, internet!
Although it might me quicker, but I think that the cout is more readable.Originally posted by abrege
Actually when outputing variables I think printf is quicker with its %v's than cout with its << v's.
none...