I am writing a program that moves a simple rectangle around a graphics window, and I want to use a WASD style control scheme to do this. I was wondering how I would get the box to move according to what key I press. I have tried makingand that didn't work. I know there must be a way to do this but I don't know what it is. I can't find this browsing the web for some reason. I guess I don't know what to search.Code:examplevariable = getch();
Can I have some other ideas on how to do this?