View Poll Results: Which method do you prefer?

18. You may not vote on this poll
  • cout << "Hello World!";

    14 77.78%
  • printf("Hello World!");

    3 16.67%
  • system("echo Hello World!");

    0 0%
  • other

    1 5.56%

Thread: Best output method

  1. #16
    Registered User moi's Avatar
    Join Date
    Jul 2002

    Re: it depends on the program

    Originally posted by NANO
    it depends on the out put that you want to display on the monitor

    I often use , cout:

    but in some cases I use system (" echo string-out-put"); When I need to show some chioces that the user should read before he typed in his chioce.
    /me winces


    one should never use system ("echo ...") for output of any kind.
    hello, internet!

  2. #17
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Visalia, CA, USA
    I agree with moi's statement about using printf for heavily formatted output. cout is capable of doing the same type of formatting but I prefer printf since it is much cleaner looking and takes less time to write. I don't like using system("echo ...") for numerous reasons. It takes longer than using puts(). It also requires me to type more letters. It is ugly. Using printf, cout, fprintf, write or fwrite are all much more standard.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help for my output array
    By qwertysingh in forum C Programming
    Replies: 1
    Last Post: 02-17-2009, 03:08 PM
  2. execl()/fork() output
    By tadams in forum C Programming
    Replies: 19
    Last Post: 02-04-2009, 03:29 PM
  3. stuck on display method
    By shintaro in forum C++ Programming
    Replies: 2
    Last Post: 02-01-2009, 05:17 PM
  4. NEED MAJOR HELP WITH HW....Newton-Raphson method
    By clezzie in forum C Programming
    Replies: 8
    Last Post: 04-14-2008, 07:52 PM
  5. Trying to store system(command) Output
    By punxworm in forum C++ Programming
    Replies: 5
    Last Post: 04-20-2005, 06:46 PM