hangman::hangman( char * surname, int size)
{
name = new char[size];
encryption = new char[size];
strcpy(name,surname);
for (int i = 0 ;i <size; i++)
{
encryption[i]='*';
}
lives = 5;
found = 0;
}
encryption seems to be heading over its borders!! the size = 45 ; I've checked that so it should be restricted to 45, however its not...when I print the value of encrpytion on the screen I get 45 * then about 10 other chars which are junk values.....anyone offer a solution?
Thanks,
John