im making this hangman game for a class assignment i was just hoping for some suggestions
its a work in progress
#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <string>
#include <array>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
string response;
int w;
const int WORDS(4);
do//outer do loop
{
const char* const OUT_STRING = "O/|\\|/\\";
array WORDS[4]= {"HOUSE,WORLD,GLOBE,BOXER"};
string xword();
string string1("i");
string string2("ix");
int n(0);
int xcount(5);
bool found(false);
bool solved(false);
bool hung(false);
int offset(0);
int bodyCount(0);
cout<<"Guess the word: xxxxx"<<endl;//user guess a word
do//nested do loop
{
cout<<"Guess a letter "<<xword<<endl;//user guess a letter
cout<<"?"<<endl;
}
char temp();//reads character entered into variable
if(!isalpha(temp))//validate for letters
{
cout<<"\nLETTERS ONLY PLEASE\N";
continue;//next iteration of do/while
}
while(i != WORDS[w].end())
{
if(*i == letters[n])
{
*(ix + offset) = *i;
found = true;
if(--xcount == 0)
solved = true;
}//end if
i++;
offset++;
}//end while
if(bodyCount == false)
{
bodyCount++;
}
return 0;
}