Declaration Syntax Error

This is a discussion on Declaration Syntax Error within the C++ Programming forums, part of the General Programming Boards category; Hello, Im new so let me first say hi to everyone... Hello World! I just started a C++ programming book, ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    3

    Angry Declaration Syntax Error

    Hello,
    Im new so let me first say hi to everyone... Hello World!
    I just started a C++ programming book, which begins with the "hello world" lesson.
    Im using Borlands free compiler
    Windows 98SE
    512MB RAM
    30G Hard Drive
    If this info helps

    When I try to compile it I get this error message:

    Error E2141 lesson1.cpp 3eclaration syntax error
    ***1 errors in compile***

    I ran the exact same same source code last week and it worked fine. Then I go to show my wife and BAM! I looked like a total idiot! (please hold your comments hehe)

    If you can help I'd really appreciate it very much!
    ~Hal

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Firstly, you posted you compiler and OS so good start!

    Secondly, you didn't post your code - err, not so good.

    Thirdly, (and oh boy you'll learn)...

    >>> Then I go to show my wife and BAM! I looked like a total idiot!

    ... welcome to programming. At least it was "wife", normally it is client/customer/boss!
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    3

    My code!

    If I would have had that happen in front of a supervisor I would probably resign before he could say "... and who hired you?" LOL

    Heres the code and thanks for replying so quickly.

    // Lesson 1 (simple cpp program)

    #include<iostream>
    using namespace std;
    Int main()
    {
    cout <<"Hello world!";
    return 0;
    }

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Note: Int and int are not the same thing! C++ is fussy. Change that and let us know if it still complains.

    >>> If I would have had that happen in front of a supervisor

    It will. It doesn't matter how many times you've been through a demo, you can be almost certain, that when you go through it for real, with real people, something unexpected will happen.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    3

    Talking You Fixed it!!!!!

    You were right on it! All is well in noviceville!

    You are so right about real-world situations! Its bound to happen, but lets just hope they were as patient as youve been.
    Thank you VERY much... you helped me save face with my wife lol.
    Have a Great Day!!!

  6. #6
    Arias_One
    Guest
    isnt that the truth...

    I showed an alpha release of a game i was making(with my small dev team) to some one interested in hosting our web site, and low and behold a had forgotten to include a frame timer/limiter in my code so it was coded to run normal on "MY" video card, but they happened to have one much better and a much better comp all arround, the next day i got an e-mail from them asking if the game was supposed to be in fast forward or not because thats how it looked to them... lol i just explained the situation to them, fixed the problem then showed them... i got the webspace then their host dumped them so now we are out of a site... again =(

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. how do you resolve this error?
    By -EquinoX- in forum C Programming
    Replies: 32
    Last Post: 11-05-2008, 04:35 PM
  3. Using VC Toolkit 2003
    By Noobwaker in forum Windows Programming
    Replies: 8
    Last Post: 03-13-2006, 07:33 AM
  4. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-30-2005, 12:21 AM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 09:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21