I wanted to know if there is a way of validating the input on a switch statement?
One of the cases is the letter 'l' but if I input a word that contains the letter it still runs which I don't want it to. Is there a way of checking?
That's the loop and the switch statement i am trying to use. If i type a word that contains any of the letters it still runs, which i don't want it to.
You haven't show the definition of move. From your usage, I presume it is a char, but that is not clear.
cin of a char will remove exactly one character from the input buffer. That doesn't prevent the user from entering additional characters. If you want to ignore additional characters, you can do the following after line 11.
BTW, if the user enters an invalid character, you're going to display the message at line 52, then fall thru to the call to moves() at line 54 as if the input was valid. row,col,count,progress,remove may not be valid.