Here's my code for a Hangman game I'm developing: #include <iostream> using namespace std; const char *const Words[]={"America", "Barrack", "country", "doctors","salamat"}; #define NWORDS (sizeof Words/sizeof (char *)) int main() { const char *toguess=Words[0]; char guess[15] = " "; int numguesses = 1; char ch; string str1; string str2; // string mychars(""); unsigned wordno=1; std::cout << "Welcome to Hangman!\nRaymund is to be executed for a crime he committed.\nTo save him, you need to guess any of the five words provided by the judge.\nYou are given only 15 tries to solve any of the 5 words.\nGoodluck!\n\nNow enter a number to select the …

Member Avatar
+0 forum 0

The End.