graphresult

graphresult是一種返回最後一次不成功圖形錯誤代碼的C語言函式名、

基本介紹

  • 外文名:graphresult
  • 屬性:C語言函式名
  • 功能:返回最後一次不成功圖形錯誤代碼
  • 用 法:int far graphresult(void);
函式名:,功 能:,用 法:,程式例:,

函式名:

graphresult

功 能:

返凝戰海危回雅煉影辯最後一次不成槓應戀功的圖形操作的錯誤代立祝妹臘樂懂碼煮樂台

用 法:

int far graphresult(void);

程式例:

#include <graphics.h>
#include <蒸連stdlib.h>
#include <stdio.h>
#include <conio.h>
int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
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;
}

相關詞條

熱門詞條

聯絡我們