C++ // GUESS A WORD MODIFICATION PROBLEM

can anyone please help me modify my game "guess a word game"
i need a question # 2 and 3.. can anyone help me! please!!!

// "guess_word.txt"
//What_is_apple? fruit edible
//What_is_balls? round basketball
//what_is_human? animal you





#include<iostream>
#include<conio.h>
#include<fstream>
#include<time.h>
using namespace std;
main()
{
srand(time(NULL));



int rand_guess;
rand_guess = rand() % 3 + 1;
char H;
int controller = 1;


ifstream infile;
infile.open("guess_word.txt");

while (!infile.eof()) {

// string output
// infile>>output;
// cout<<output<<endl;
string question;
infile>>question;
string guess;
string answer;
infile>>answer;

string hint;
infile>>hint;

if (rand_guess == controller) {
cout<<"Question is "<<question<<endl;
//cout<<"Answer is "<<answer<<endl;
cout<<"PRESS H FOR HINT(X TO CANCEL IT)"<<endl<<"---->";
cin>>H;
if (H == 'h'||H == 'H')
{cout<<"Hint is "<<hint<<endl;


}
else if (H == 'X'||H == 'x')
cout<<"Enter your MAGIC WORD: ";
{cin>>guess;
if (guess == answer)
{cout<<"correct"<<endl;
system("pause");
return 0;}
else
{cout<<"wrong";}
system("pause");
return 0;
}
if (guess == answer)
{
cout<<"correct";
system("pause");
return 0;}
else
{cout<<"wrong";
system("pause");}
return 0;
}

controller++;


}

system("pause");
return 0;
}
Topic archived. No new replies allowed.