View Poll Results: prinf/scanf vs/ cout/cin

Voters
5. You may not vote on this poll
  • Printf/ScanF

    0 0%
  • Cout/cin

    5 100.00%

printf,scanf vs. cout, cin. Voice your choice

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...

  1. #1
    Registered User
    Join Date
    Aug 2002
    Posts
    67

    printf,scanf vs. cout, cin. Voice your choice

    Explain why you use what you use

  2. #2
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    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

  3. #3
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,793
    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

  4. #4
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    cout/cin

    [1337]STL r0xorz!!!1[/1337]

  5. #5
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I'm REALLY confused. Why isn't cout or cin working here?
    By niudago in forum C++ Programming
    Replies: 8
    Last Post: 02-15-2003, 04:53 PM
  2. cin and cout
    By quentin in forum C++ Programming
    Replies: 6
    Last Post: 04-27-2002, 02:04 PM
  3. cout and cin
    By ygfperson in forum C++ Programming
    Replies: 2
    Last Post: 02-02-2002, 09:32 AM
  4. STL to: Cin, Cout, ifstream & ofstream
    By kuphryn in forum C++ Programming
    Replies: 3
    Last Post: 12-02-2001, 08:32 AM
  5. i don't know about cin, cout, flag.
    By comwin in forum C++ Programming
    Replies: 2
    Last Post: 11-08-2001, 03:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21