Arrow keys user input for codeblocks

+2 John A · March 9, 2015
I have been using Codeblocks IDE to program, as seen in Bucky's videos. I was looking to utilize the arrow keys for user input but I believe it requires a specific library. When I looked for the library, I found some but got repeated error messages, something about Windows not working.

For example my, my first 5 lines are 

#include <iostream>
#include <vector>
#include <conio.h>
#include <windows.h>
#include <ctime>

I get an error that says "undefined reference to "WinMain@16" so I'm assuming one of the libraries I included only works on visual studio?

Anyway, how can I get arrow keys to be used for user input?

Post a Reply


Oldest  Newest  Rating
0 H. P. Lovecraft · March 9, 2015
Hi, are you using MS-DOS?
0 John A · March 10, 2015
Sorry I am very new to programming so I may not understand all of the jargon. I am using Codeblocks on Windows 8.
  • 1



Used in many types of software including music players, video games, and many large scale applications.

Bucky Roberts Administrator