Adblock breaks this site

C++ Question.

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

  1. Trollologist

    Trollologist Newcomer

    Joined:
    Jun 2, 2013
    Posts:
    1
    Referrals:
    0
    Sythe Gold:
    0
    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.
     
  2. Virtual

    Virtual Guru
    $25 USD Donor New

    Joined:
    Jan 25, 2013
    Posts:
    1,250
    Referrals:
    1
    Sythe Gold:
    226
    Two Factor Authentication User Halloween 2015 Easter 2015 Sythe's 10th Anniversary
    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 >


 
 
Adblock breaks this site