Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

how to take input of arrow keys in c(currently using codeblocks)

$
0
0

HI there

I have been working on developing a puzzle game in c. In order to do so , ill be needing to take input of arrow keys. Please suggest a suitable function to input arrow keys.

Ive found one which is given below.

include<dos.h>
sgetkey()
{
union REGS i,o;
while(!kbhit());
i.ah.h=0;
int86(22,&i,&o);
return(o.h.ah);
}
but it keeps on showing

error:storage size of i is unknown.
error:storage size of o is unknown.

I want to make this in codeblocks. So please share a suitable solution.


Viewing all articles
Browse latest Browse all 39796

Trending Articles