OK - some things to fix up here.
First, I wouldn't bother with a string for user input - just use a chars ('U', 'D', 'L', 'R'). What if the user types in DOwn for example?
Make use of the toupper function so you don't test the value of variables twice.
Use a switch rather than else if conditions, have an option to quit, and use the default clause to catch bad input.
Put the switch inside a bool controlled while loop.
Have function that displays the menu - you can have code in the while loop before the switch so it only displays the first time if you want.
DON'T USE GOTO There are very rare situations where this is warranted, but this isn't one of them. The break at the end of case in the switch will achieve the same thing.
Have a function to display the grid - this will avoid repetition of code.
Don't have magic values like 7 & 10 in your code, do this instead:
1 2 3 4
|
const SIZEROW = 7;
const SIZECOL = 10;
char Board[SIZEROW][SIZECOL]; //better name as well
|
You could have one function to decide if the move is invalid or not. It would only need one statement inside it.
If you take all this on board - it probably means starting again - hopefully your problem might go away. Don't be tempted to persevere & get this code working - IMO it is better to do it right and have good code that works, rather than have bad code than works.
Hope all goes well :)