class theGame
{
private:
void question1();//You awake
void question2();//Go find a sword
void question3();//Go find armor
void question4();//Find dragon
void question5();//Kill dragon
char answer1;
char answer2;
char answer3;
char answer4;
char answer5;
public:
void showQuestion();
void enterAnswer();
};
void theGame::showQuestion()
{
void question1();
void questoin2();
void question3();
void question4();
void question5();
}
void theGame::question1()
{
int right;
cout<<"You awake and get out of bed and realize that you want to go kill a dragon for no reason. Now what? ";
cin >> answer1;
if (answer1 == 'Leave')
right = 1;
else
right = 0;
while(right = 0)
{
cout << "That doesn't work. Try again... " << endl;
cin >> answer1;
if (answer1 == "Leave")
right = 1;
else
right = 0;
}
if (right = 1)
cout<<"You leave your house and now you need to find a sword. " << endl;
}
Error: error C2446: '==' : no conversion from 'const char *' to 'int'
Basicaly I'm making a VERY simple text based adventure game, I am probably doing it all wrong, and I'm using Visual C++ 2008. Also if you could tell me how to find a word in a sentence the user will enter that would be nice too. Thanks! Question 2 - 5 are basically just a copy and past of Question1.