C++ newbie trying to make a simple text game on a 2D array.

When I use the `switch` statement as shown. It will always print the default value, regardless of what else happens.

From other threads and forums I found it probably has something to do with the `getch()` and that it returns the `char` as well as `\n`.

I have tried for an hour now but I can not solve this. The reason I use `getch()` is this: [C++ change canonical mode in windows](https://stackoverflow.com/questions/24262287/c-change-canonical-mode-in-windows) (for reference).

Part of my code now:

```
//Set up game field
generateField();
setPlayerStart();

//printGameInfo(); TO BE MADE

//Start game while loop
int userInput;

do{
    //system("cls"); DISABLED FOR TESTING PURPOSES
    printField();
    userInput = getch();

    switch(userInput){
        case 72:{ //ARROW UP
            cout << "1What" << endl; //ALSO FOR TESTING PURPOSES
            break;
        }

        case 80:{ //ARROW DOWN
            cout << "2What" << endl;
            break;
        }

        case 75:{ //ARROW LEFT
            cout << "3What" << endl;
            break;
        }

        case 77:{ //ARROW RIGHT
            cout << "4What" << endl;
            break;
        }

        case 113:{ //"q"
            return false; //Quit game
        }

        default:{
            cout << "Default..." << endl;
        }
    }
} while(userInput != 5);

```