View Poll Results: Which is is better

57. You may not vote on this poll
  • cout

    26 45.61%
  • printf()

    24 42.11%
  • Either

    7 12.28%
  • Neither

    0 0%

Thread: Which one will you prefer: cout or printf

  1. #31
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    yes, i would hate having to DIY formatted output [redirection as well, thank the lord for vsprintf...]...
    hasafraggin shizigishin oppashigger...

  2. #32
    Registered User
    Join Date
    Oct 2001
    According to my compiler and profiler, cout is on average 5.75 milliseconds faster than printf. So much for that argument...
    Hmm, printf() benches faster than cout on mine. (mingw32) I think the moral to this story is, that nobody really cares what you use as long as you are comfortable using it.
    Allegro precompiled Installer for Dev-C++, MSVC, and Borland:

  3. #33
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    i prefer cout for its simplicity, but its only there when im in c++.

  4. #34
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Visalia, CA, USA
    cout has quite a bit of overhead that printf doesn't have. And needless to say cout adds quite a bit of size to a file. I actually tend to use both a lot. I go with printf. In terms of ease I'd say that it is an undoubted tie. When it comes to speed, like I said cout has quite a bit of overhead. I found myself using sprintf more than both since I program windows most of the time.

  5. #35
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    cout, was raised with it .

  6. #36
    Registered User Credo's Avatar
    Join Date
    Feb 2002


    I don't really have a favorite...they both get the job done. Unless your going to print and entire novel to the screen, speeds not much of an issue. If I had to choose one over the other I'd go with cout because its a little easier to use.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 03-05-2009, 10:25 AM
  2. Need Help with a Bowling Score Program
    By oobootsy1 in forum C++ Programming
    Replies: 6
    Last Post: 11-01-2005, 10:04 AM
  3. Double to Int conversion warning
    By wiznant in forum C Programming
    Replies: 15
    Last Post: 09-19-2005, 09:25 PM
  4. Replies: 4
    Last Post: 04-01-2003, 12:49 AM
  5. difference between cout and printf
    By Shadow12345 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2002, 09:27 AM