printf vs cout

This is a discussion on printf vs cout within the C++ Programming forums, part of the General Programming Boards category; I think C++ Cout and stuff was made to make it easier for new users to learn and understand programming. ...

  1. #16
    Registered User
    Join Date
    Apr 2006
    Posts
    137
    I think C++ Cout and stuff was made to make it easier for new users to learn and understand programming. Also convenience, easier to type it out.

    But the C library printf, sprintf, and the tons of other functions, are extremely useful for dealing with chars and even for Win32 sometimes. They are definitely better.
    ★ Inferno provides Programming Tutorials in a variety of languages. Join our Programming Forums. ★

  2. #17
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,271
    Quote Originally Posted by brewbuck
    The stream insertion operator makes things convenient and extensible, but I think it's hard to dispute the compactness and clarity of printf-style format specifiers, even if they aren't type-safe.
    I recall that the Boost Format library, mentioned by phantomotap, aims to provide "printf-like formatting, in a type-safe manner which allows output of user-defined types".

    Quote Originally Posted by execute
    They are definitely better.
    No since they are not type-safe, though they are better in some ways, as mentioned earlier.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  2. making it portable.....?
    By ShadeS_07 in forum C Programming
    Replies: 11
    Last Post: 12-24-2008, 09:38 AM
  3. Need Help with a Bowling Score Program
    By oobootsy1 in forum C++ Programming
    Replies: 6
    Last Post: 11-01-2005, 10:04 AM
  4. Whats Wrong Whith This!?
    By SmokingMonkey in forum C++ Programming
    Replies: 8
    Last Post: 06-01-2003, 10:42 PM
  5. (printf VS cout) and (including libraries)
    By \cFallen in forum C++ Programming
    Replies: 3
    Last Post: 01-20-2003, 09:47 PM

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