This code block is making sure the user is entering the correct character, either y/n.
cout<<"\nDo you want to continue? (y/n): ";
while(response != 'y' || response != 'n')
if (response == 'y' || response == 'n')
cout<<response<<" is an invalid input. Please re-enter your answer (y/n): ";
as you guys can see, an "if...block" doesn't need to be there, but if I remove it, my program will keep asking user to enter valid repsonse character, another words, it's infinity loop. I tested this on VS 1005 express edition and Unix. they are both produced the same result.
if anyone have an idea/something wrong/better way to accomplish this task with this code block, I am greatly appreciated it.