int j;
for ( j= 0 ;j <sizeOfArray ; j++)
{
if( letter == array2[j] )
{
++found ;
encryption[j] = array2[j];
}
}
if ( array2[j] =='\0' && found!=0)
{
cout << "not found" <<endl;
--looselife;
cout << "You now have" << looselife << "remianing" <<endl;
}
Can anyone tell me why my code is always doing the 2nd if statement even if the first one is true? I can put an else since its illegal :( ...