Welcome to Kodlogs Q&A, where you can ask programming questions and receive answers from other members of the community. For programmers, by programmers Kodlogs is an open community for anyone that does coding. We help you get answers to your toughest coding questions, share knowledge with your coworkers in private, and find your next IT dream job.
0 votes
3 views
What is "expected unqualified-id" ?
in C# Programming by (2.5k points)
edited by

1 Answer

0 votes
I get a mistake "blunder: expected inadequate id before '{' token" on line 6.

Any suggestions please

#include <iostream>

utilizing namespace std;

class Test;

{

open:

void setWord( string word )

{

theWord = word;

}

string getWord()

{

return theWord;

}

void displayWord()

{

cout << "Your pledge is " << getWord() << endl;

}

private:

string theWord;

}

int principle()

{

string aWord;

WordGame theGame;

cin >> aWord;

theGame.setWord(aWord);

theGame.displaymessage();

}

There ought to be no semicolon here:

class Test;

...in any case, there ought to be one toward the finish of your group definition:

...

private:

string theWord;

};/<- - Semicolon ought to
by (8.5k points)
...