Hey guys its me again!
I'm stuck on a logic thing of where to put some code. Basically I want to take an input from the keyboard and store that into an array using a class whilst combining it with the other stuff that the class does.
void hangman::getletter(char letter)
{
int i;
for ( i= 0 ;i < 4 ; i++)
{
if( letter ==name[i] )
{
encryption[i] = name[i];
break;
}
}
if (i == 4)
{
cout << "not found" <<endl;
looselife();
}
}
I though of adding it onto the end of here but not sure what the code would be. I've made a buffer to store it in and set it using the constructor, but how would i go about moving the 'i' (counter) everytime this function is called to aviod over writing of the array?
John........