返回列表 发帖

怎么编译不通过?

我怎么在linux下用命令gcc bison.c老是出错呢?
#include <stdio.h>
#include <bios.h>
#include <ctype.h>

#define RIGHT  0x01
#define LEFT   0x02
#define CTRL   0x04
#define ALT    0x08

int main(void)
{
   int key, modifiers;

   /* function 1 returns 0 until a key is pressed */
   while (bioskey(1) == 0);

   /* function 0 returns the key that is waiting */
   key = bioskey(0);

   /* use function 2 to determine if shift keys were used */
   modifiers = bioskey(2);
   if (modifiers)
   {
      printf("[");
      if (modifiers & RIGHT) printf("RIGHT");
      if (modifiers & LEFT)  printf("LEFT");
      if (modifiers & CTRL)  printf("CTRL");
      if (modifiers & ALT)   printf("ALT");
      printf("]");
   }
   /* print out the character read */
   if (isalnum(key & 0xFF))
      printf("'%c'\n", key);
   else
      printf("%#02x\n", key);
   return 0;
}

返回的好像是头文件有问题。但是头文件怎么会有问题呢?

把错误贴上来
估计是少了头文件。

[ 本帖最后由 mgqw 于 2010-3-16 16:29 编辑 ]
1

评分人数

  • admin

TOP

#include <bios.h>
这一行错了

TOP

返回列表