Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. void ginit()
  2. {
  3. /* request auto detection */
  4. int gdriver = DETECT, gmode, errorcode;
  5.  
  6. /* initialize graphics mode */
  7. initgraph(&gdriver, &gmode, "c:\\tc\\bgi");
  8.  
  9. /* read result of initialization */
  10. errorcode = graphresult();
  11.  
  12. if (errorcode != grOk) /* an error occurred */
  13. {
  14. printf("Graphics error: %s\n", grapherrormsg(errorcode));
  15. printf("Press any key to halt:");
  16. getch();
  17. exit(1); /* return with error code */
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement