0

I need to code a 2D array and one player in the array, and then I want to move the player with the arrow keys. I googled for methods and libraries and found kbhit(), #include <conio.h>, however those are outdated already.
I do not know why this kind of common questions' answers are not available on the web easily.

I am using windows 7 and VS 2015 C++.

Quentin
  • 62,093
  • 7
  • 131
  • 191
Wave
  • 111
  • 1
  • 3
  • 12
  • 1
    This is way too broad. What you need to do is break down the problem into tasks and tackle them one at a time: create 2D array, acquire input from arrow keys, move player in array according to key pressed, print array, ... – Marko Popovic Apr 13 '16 at 09:49

1 Answers1

1

I usually use OpenCV for this kind of stuff. It could help you a little with image manipulation as well, with the down side that you will have to use it for image rendering as well. To get key input you use:

char key_input = waitKey(0); and then check for key_input's value.

aybassiouny
  • 559
  • 5
  • 14