Dostaję błąd "error: oczekuje bezwarunkowego-id before '{' żeton" na linii 6.C++ błąd: oczekiwano niewykwalifikowany-id
Nie mogę powiedzieć, co się stało.
#include <iostream>
using namespace std;
class WordGame;
{
public:
void setWord(string word)
{
theWord = word;
}
string getWord()
{
return theWord;
}
void displayWord()
{
cout << "Your word is " << getWord() << endl;
}
private:
string theWord;
}
int main()
{
string aWord;
WordGame theGame;
cin >> aWord;
theGame.setWord(aWord);
theGame.displaymessage();
}