C++ Question.

Discussion in 'Programming General' started by Trollologist, Jun 2, 2013.

C++ Question.
  1. Unread #1 - Jun 2, 2013 at 11:35 AM
  2. Trollologist
    Joined:
    Jun 2, 2013
    Posts:
    1
    Referrals:
    0
    Sythe Gold:
    0

    Trollologist Newcomer

    C++ Question.

    So I am starting with C++ and I am reading some books, I just started with the Hello World programs, so I want to make sure this is correct.

    #include <iostream.h> //Tells the compiler that there will be a cout or cin.


    main()
    {
    cout << "Hello World!";
    return 0;
    }

    I would very much like all the feedback I can get, for I want to learn as much as I can.
     
  3. Unread #2 - Jun 2, 2013 at 12:14 PM
  4. Virtual
    Joined:
    Jan 25, 2013
    Posts:
    1,250
    Referrals:
    1
    Sythe Gold:
    226
    Two Factor Authentication User Halloween 2015 Easter 2015 Sythe's 10th Anniversary

    Virtual Guru
    $25 USD Donor New

    C++ Question.

    That code doesn't work, try changing first line to:
    Code:
    #include <iostream> //Tells the compiler that there will be a cout or cin.
    using namespace std;
    Full code:
    Code:
    #include <iostream>
    using namespace std;
     
    main () {
      cout << "Hello World!";
      return 0;
    }
    Test your code online here: https://ideone.com/
     
< C# Request. | Runescape Scripts >

Users viewing this thread
1 guest


 
 
Adblock breaks this site