C语言

A 开头函数 B 开头函数 C 开头函数 D 开头函数 E 开头函数 F 开头函数 G 开头函数 H 开头函数 I 开头函数 K 开头函数 L 开头函数 M 开头函数 O 开头函数 P 开头函数 R 开头函数 S 开头函数 T 开头函数 U 开头函数 V 开头函数 _ 开头函数 转换函数 诊断函数 接口函数 字符判别函数 目录函数 输入输出函数 数学函数 操作函数 进程函数 字符串操作函数 时间日期函数 存储分配函数 assert.h头文件 alloc.h头文件 ctype.h头文件 dir.h头文件 dos.h头文件 errno.h头文件 fcntl.h头文件 float.h头文件 graphics.h头文件 io.h头文件 limits.h头文件 malloc.h头文件 math.h头文件 mem.h头文件 process.h头文件 setjmp.h头文件 share.h头文件 signal.h头文件 stdarg.h头文件 stddef.h头文件 stdio.h头文件 stdlib.h头文件 string.h头文件 time.h头文件 values.h头文件

函数名: grapherrormsg
功  能: 返回一个错误信息串的指针
用  法: #include <graphics.h>
        char *far grapherrormsg(int errorcode);
程序例:

#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

#define NONSENSE -50

int main(void)
{
   /* FORCE AN ERROR TO OCCUR */
   int gdriver = NONSENSE, gmode, errorcode;

   /* initialize graphics mode */
   initgraph(&gdriver, &gmode, "");

   /* read result of initialization */
   errorcode = graphresult();

   /* if an error occurred, then output a */
   /* descriptive error message.          */
   if (errorcode != grOk)
   {
      printf("Graphics error: %s\n", grapherrormsg(errorcode));
      printf("Press any key to halt:");
      getch();
      exit(1); /* terminate with an error code */
   }

   /* draw a line */
   line(0, 0, getmaxx(), getmaxy());

   /* clean up */
   getch();
   closegraph();
   return 0;
}