Explain why you use what you use
Printf/ScanF
Cout/cin
This is a discussion on printf,scanf vs. cout, cin. Voice your choice within the C++ Programming forums, part of the General Programming Boards category; Explain why you use what you use...
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.
I used to be an adventurer like you... then I took an arrow to the knee.
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 ()
Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com
-the shroom has spoken