默默吐槽老师使用如此古老的borlandC++,网上关于这个东西的资料真的不多,而且使用也很不方便。。。。
这学期的课真的全是雷。。。。
- abort( 异常终止一个进程)
- abs(求整数的绝对值
- bioskey(直接使用BIOS服务的键盘接口)
- biosmemory(返回存储块大小)
- clreol(在文本窗口中清除字符到行末)
- clrscr(清除文本模式窗口)
- fflush(清空缓冲区)
- delay(将程序的执行暂缓一段时间)
- kbhit(检查当前是否有键盘输入)
- gotoxy(设定光标在屏幕上的位置)
- getchar(从stdin流中读字符)
- getch(从控制台无回显地取一个字符)
- getche(从控制台取字符(带回显))
- textcolor textbackground textattr cprintf(设置文本颜色并输出)
- _setcursortype(设置光标的形状)
abort
功 能: 异常终止一个进程 ;用 法: void abort(void);
#include <stdio.h>
#include <stdlib.h>int main(void)
{
printf("Calling abort()/n");
abort();
return 0; /* This is never reached */
}
abs
求整数的绝对值 ;用 法: int abs(int i);
#include <stdio.h>
#include <math.h>int main(void)
{
int number = -1234; printf("number:%d absolute value:%d/n",number,abs(number));
return 0;
}
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 0x08int 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"
3791


&spm=1001.2101.3001.11974&articleId=115655291&d=1&t=3&u=5e054fa97d524128853591de44eeafb7)

被折叠的 条评论
为什么被折叠?



