#include <stdio.h>
#include <stdlib.h>
/*
int main()
{
char buf[4][9]={"A A1A2A3","B B1B2B3","C C1C2C3"};
int i;
int j;
for(i = 0;i<4;i++)
{
for(j = 0;j<8;j++)
{
printf("%c\n",buf[i][j]);
}
}
return 0;
}
/*
char buf1[4][4]={“A”,“A1”,“A2”,“A3”};
char buf2[4][4]={“B”,“B1”,“B2”,“B3”};
char buf3[4][4]={“C”,“C1”,“C2”,“C3”};
*/
case 72:
//上
break;
case 80:
//下
break;
case 75:
//左
break;
case 77:
//右
break;
case 32: //空格是暂停
getch();
break;
#include <stdio.h>
#include <stdlib.h>
int getkey_enent(int key);
void display(int on_off);
int main()
{
char buf[4][9]={"A A1A2A3","B B1B2B3","C C1C2C3"};
while(1)
{
switch (getch())
{
case 75:
break;
case 77:
break;
case 72:
break;
case 80:
break;
default:
break;
}
int key;
int on_off = getkey_enent(key);
display(on_off);
}
return 0;
}
int getkey_enent(int key)
{
if(1==key)//up
{
return 1;
}
if(2==key)//down
{
return 0;
}
}
void display(int on_off)
{
if(0==on_off)
{
if(getcher = '')
}
else if(1==on_off)
{
}
}