This important part looks like it got lost.
while ( game1.getlives() != 0 && game1.checkstatus() )
This is how I might write checkstatus.
int hangman::checkstatus()
{
int i;
for ( i = 0; encryption[i] != '\0'; ++i )
{
if ( encryption[i] == '*' )
{
return 1;
}
}
cout<<"You win!"<<endl;
return 0;
}
Reputation Points: 2780
Solved Threads: 312
long time no c
Offline 4,790 posts
since Apr 2004