c语言scanf能获取字符,键盘上的上下左右能不能获取,怎么获取,获取后是什么格式的?

来源:百度知道 编辑:UC知道 时间:2024/06/25 20:05:13
能帮我写程序 获取向上
判断如果你按向上 光标向上移动吗

给你个完整的程序:
/******************************************************************************
程序用于演示下拉菜单的操作,实现了第一个菜单File的子菜单
******************************************************************************/
#include <process.h>
#include <stdlib.h>
#include <stdio.h>
#include <dos.h>
#include <conio.h>
#define key_down 80 /* 向下箭头键 */
#define key_up 72 /* 向上箭头键 */
#define key_esc 1 /* ESC键 */
#define key_alt_f 33 /* Alt + F*/
#define key_alt_x 45 /* Alt + X */
#define key_enter 28 /* Alt + Enter */

/* 函数声明 */
int get_key();
void box(int startx,int stary,int high,int width);

main()
{
int i,key,x,y,l;
char *menu[]={"File","Edit","Run","Options","Help","Setup","Zoom","Menu"};
char *red[]={"F","E","R","O"