How to fix C++ error: expected unqualified-id

There should be no semicolon here:

class WordGame;

…but there should be one at the end of your class definition:

...
private:
    string theWord;
}; // <-- Semicolon should be at the end of your class definition

Leave a Comment