Results 1 to 3 of 3

Thread: Nooob

  1. #1
    Join Date
    Sep 2006
    Posts
    1

    Nooob

    Hi everyone i am new to programming and i ounder if you can help me get started... i have looked on the first video and i cant get i to work.

    if you can look at my code and say what's wrong i whould be greatful

    #include <iostream>

    //using namespace std;
    using std::cout;

    main ()
    {
    //std::cout << "Hallo World!" << std::endl;
    cout << "HalloWorld!'\n";
    }

    My error massage is error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>Build log was saved at

  2. #2
    Join Date
    Dec 2006
    Location
    Maple Valley Washington
    Posts
    289
    This is explained a lot through the webiste if you did a search for it. Also you can check out Mr. charisma's website for the awnser to.

    http://www.20papercups.net/tutorials...zz-suppliment/

  3. #3
    Join Date
    Mar 2005
    Posts
    934
    That was an unfortunate error in the videos, teaching non-standard C++. Read the "Thread of Information" thread at the top of the C++ forum to find answers to these kinds of questions.

    You need to declare main() as returning type int, and then return an int at the end of the function:
    Code:
    #include <iostream>
    
    //using namespace std;
    using std::cout;
    
    int main ()
    {
      //std::cout << "Hallo World!" << std::endl;
      // cout << "HalloWorld!'\n"; ------- you had an unnecessary " ' " in there
      cout << "HalloWorld!\n";
    
      return 0;
    }
    "I don't WANT to pet the chicken."

Tags for this Thread

Posting Permissions

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