Explain why you use what you use
Printf/ScanF
Cout/cin
Explain why you use what you use
cout/cin
Easier, type-safe, nicer code and more flexible (stringstream, fstream etc.).
Last edited by Sang-drax; 09-16-2002 at 01:53 PM.
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
I like how cout/cin make my code look, however when I have to format my output, floats/ints etc, to come out in a certain way, I always find myself thinking that it used to be so much less of a hassle using the good old format specifiers with printf. I guess I just need to get used to all of the stream manipulators that are available... and I don't quite get why everything defined under the iomanip header isn't already a part of the iostream header.
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens
cout/cin
[1337]STL r0xorz!!!1[/1337]
cout/cin easier to look at and stuff
printf ("text"); or however it goes doesnt seem right to me but
cout << "text" << endl; does. i think its the apprenticies ()