Results 1 to 8 of 8

Thread: Every Hello World You Can Make!

  1. #1
    Senior Member
    Join Date
    Sep 2003
    Posts
    500

    Every Hello World You Can Make!

    I found a complete list of hello world functions, go now:

    http://c2.com/cgi/wiki?HelloWorldInM...mmingLanguages
    You shall no longer take things at second or third hand,
    nor look through the eyes of the dead...You shall listen to all
    sides and filter them for your self.
    -Walt Whitman-

  2. #2
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,883
    Code:
    #include <iostream>
     int main()
     {
            std::cout << "Hello, Ward." << std::endl;
     }
    thats the most screwy version of C++ hello world I have ever seen.... Not only does it not spell world properly, but whats with all the std:: crap...
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

  3. #3
    AO Antique pwaring's Avatar
    Join Date
    Aug 2001
    Posts
    1,409
    Well, cout is in the std namespace (as is endl), so technically you should use std::cout when you want to send data to the standard output.

    Edit: Went on the Wiki and corrected the spelling mistake for you souleman.
    Paul Waring - Web site design and development.

  4. #4
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,883
    I know its in means stdout, but who the hell actually programs like that?
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

  5. #5
    AO Antique pwaring's Avatar
    Join Date
    Aug 2001
    Posts
    1,409
    Me.
    Paul Waring - Web site design and development.

  6. #6
    Senior Member
    Join Date
    Sep 2003
    Posts
    500
    Yeah a lot of the diehard C++ programmers (*cough*pwaring*cough*) think that using

    using namespace std;

    completely destroys the purpose of having namespaces. I don't do it but If you want a page long explanation with charts, graphs, quotes, and a gif or two then ask pwaring all about it
    You shall no longer take things at second or third hand,
    nor look through the eyes of the dead...You shall listen to all
    sides and filter them for your self.
    -Walt Whitman-

  7. #7
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,883
    pwaring> if you want a language that requires you to type all sorts of crap before you can output a line use java..

    System.out.println is a lot longer then cout
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

  8. #8
    AO Antique pwaring's Avatar
    Join Date
    Aug 2001
    Posts
    1,409
    I use Java as well.

    I just think that you should be explicit wherever possible in any language - the only exception to this being Perl because it's good enough for one-liners.
    Paul Waring - Web site design and development.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •