易截截图软件、单文件、免安装、纯绿色、仅160KB

C函数名: bioskey

函数名: bioskey
功 能: 直接使用BIOS服务的键盘接口
用 法: int bioskey(int cmd);
程序例:

#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;
}

无法在CodeBlocks编译,在安装目录中也没有发现 <bios.h>,是不是CodeBlocks不支持
提示无法找到bioskey


用 tc 好了
用 tc 好了
用 tc 好了




引用
又是一个老掉牙的程序,它是DOS代


相关问答:

C#填网页表单的问题 - .NET技术 / C#

我这里有一个登陆WIFI网络的页面。由于WIFI经常断线,所以要反复地在这个网页上登陆,没法无人值守。
所以,我想做一个C#程序,放一个webbrowser控件,自动填表并自动点击提交按钮。
问题一:
基本照网上找的程序 ......

求教c/c++语言相关问题 - C/C++ / C语言

有一10*10矩阵,除去第一个点(0,0)和最后一点(9,9),还有八个点为1,其他都为0,要求用二维数组表示。八个点是随机生成的,编写相关程序表示矩阵所有可能情况。
真心求教各位高手,哎!本人太菜了!呵呵!
......

帮忙看看这几个C - C/C++ / C语言

帮帮忙,谢谢~
1. Write a program to perform a topological sort on a graph.
2. Write a program to solve the single‐source shortest‐path problem (Dijkstra
algorithm).
3. Write a program ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号