I have an error and can't fix it :(.

This is a discussion on I have an error and can't fix it :(. within the C++ Programming forums, part of the General Programming Boards category; The error is "error C2143: syntax error : missing ';' before 'using'. File: menu.h Line: 21 Any help would be ...

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    36

    I have an error and can't fix it :(.

    The error is "error C2143: syntax error : missing ';' before 'using'.

    File: menu.h

    Line: 21

    Any help would be WONDERFUL.. I'm stressin.

    Code:
    //  ======
    //  NOTES:
    //
    //  1) 
    //  ==
    
    //  ===========
       #pragma once;
    //  ===========
       #include "Types.h";
       #include "DoubleLinkedList.h";
    //  ======================
    //  Header File Inclusions
    //  =======================
       #include <string>;
    //  ================
    
    
    
    //  ====================
        using namespace std;
    //  ====================
    
    //  ============
        class Menu {
    
            public:
    
    //          ============
    //          Constructors
    //          =============
                Menu( void );
    //          =============
    
    //          ==========
    //          Destructor
    //          ===========
               ~Menu(void);
    //          ===========
    
    //          ==========================
    //          Member-Function Prototypes
    //
    //          NOTES:
    //
    //          1) The names for the accessor and mutator member-functions
    //             will make use of the words Get and Set followed by the
    //             appropriate member-variable identifier.
    //          ====================================================
                MenuChoices Menu::Get( );                // Accessor
                void        Menu::Set( MenuChoices );    // Mutator
                void        Menu::Display( );
                void        Menu::QueryUser( );
                bool        Menu::Continue( );
                void        Menu::ProcessCommand( DoublyLinkedList& );
    //          ======================================================
    
            private:
    
    //          ================
    //          Member-Variables
    //
    //          NOTES:
    //
    //          1) 
    //          ==============================
                MenuChoices userMenuSelection;
    //          ==============================
    
        }; // Class Menu
    //  ================

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Includes and pragmas don't have ; after them.

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    36
    I removed them and still get the same error :/.

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Then you are missing a semicolon in one of your headers, either Types.h or DoubleLinkedList.h (probably the latter).

  5. #5
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by tabstop View Post
    Then you are missing a semicolon in one of your headers, either Types.h or DoubleLinkedList.h (probably the latter).
    Quick check... put a semi-colon on a line by itself before the includes... it will change the error and may give good clues about where to look.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 11-15-2010, 10:14 AM
  2. Replies: 3
    Last Post: 10-02-2007, 09:12 PM
  3. Replies: 1
    Last Post: 01-11-2007, 04:22 PM
  4. Compiler error error C2065: '_beginthreadex; : undeclared identifier
    By Roaring_Tiger in forum Windows Programming
    Replies: 3
    Last Post: 04-29-2003, 01:54 AM
  5. fatal error C1001: INTERNAL COMPILER ERROR
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 04-21-2002, 12:07 PM

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