|
#include int main(void) /* initialize graphics mode */ /* read result of initialization */ if (errorcode != grOk) /* an error occurred */ /* draw a line */ /* clean up */
E-mail:
info@telesys.ru
#include
#include
#include
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver, &gmode, "");
errorcode = graphresult();
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* return with error code */
}
line(0, 0, getmaxx(), getmaxy());
getch();
closegraph();
return 0;
}
Ответы