Syntax Error???

This is a discussion on Syntax Error??? within the C++ Programming forums, part of the General Programming Boards category; When i type in correct code and syntax and compile it, the compiler tells me that theres syntax and parse ...

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    3

    Question Syntax Error???

    When i type in correct code and syntax and compile it, the compiler tells me that theres syntax and parse errors! What's wrong?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,271
    You need to provide an example.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Jul 2005
    Posts
    3
    how bout a simple console app like this:

    Code:
    #include <iostream>
    
    using namespace std;
    
    int main();
    {
      cout<<"Hello!";
      cin.get;
    }
    there was a syntax error with '{' right after the main function
    Last edited by Maerus; 07-03-2005 at 01:19 AM.

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    >how bout a simple console app like this:
    >int main();
    How bout what's with the semicolon?

  5. #5
    Registered User
    Join Date
    Jul 2005
    Posts
    3
    heh, oops, common mistake!
    Last edited by Maerus; 07-03-2005 at 01:27 AM.

  6. #6
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,812
    Also it is cin.get() not cin.get.
    Woop?

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. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  4. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 11:52 PM
  5. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 05:27 AM

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