Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ginit()
- {
- /* request auto detection */
- int gdriver = DETECT, gmode, errorcode;
- /* initialize graphics mode */
- initgraph(&gdriver, &gmode, "c:\\tc\\bgi");
- /* 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); /* return with error code */
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement