Solved

Arrow Keys

Posted on 1998-08-14
1
328 Views
Last Modified: 2010-04-15
Need a source code that uses arrow keys.
0
Comment
Question by:Nene19
1 Comment
 
LVL 16

Accepted Solution

by:
imladris earned 50 total points
ID: 1252122
int c,arrow;

arrow=0;
c=getch();
if(c==0)arrow=getch();
if(arrow!=0)
{    .....
}


if arrow is 72 it is UP, if it is 80 it is DOWN
if it is 75 it is LEFT, if it is 77 it is RIGHT

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now