C++ Source Code For Hangman Game
C++ Source Code For Hangman Game
#include
#include
#include
#include
#include
<iostream>
<fstream>
<string>
<cstring>
<ctime>
<cstdlib>
char user_in;
cout << endl << endl << "Enter the guessed word: ";
cin >> user_in;
for(unsigned int i = 0; i < guess_word.length(); i++)
{
if(user_in == guess_word[i] )
{
wordarr[i] = user_in;
}
};
}
//______________________________________________________________________________
______________________
/*if(user_in == guess_word)
{
cout << endl << "
You are genius :), You g
uessed what I have thought.";
}
else if(i != 0)
{
cout << endl << "
Sorry!! Try another." <<
endl << "
You have " << i << " lives left,";
}
else
cout << "
You failed!" << endl << "
Word was \'" << guess_word << "\' .";
}
}*/
return 0;
}