Hi,
** I am using Turbo C Version 2.01 (DOS)
Currently i am working with a program that uses the graphics device to use certain functions like line(); etc. This uses the "graphics.h" header file.
I find that when i attempt to use the "cprintf" function it doesn't work. In fact, it only works when there is no graphics initialisation or when the closegraph(); function is used, but this takes away all the line functions i just made.
My question is: Is there a way to use the graphics device, keeping all your line functions on the screen, while using cprintf function.
Here is the code i am using to initialise my graphics device:
Code:
/* Initialising Graphics Drivers */
/* 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 */
}
/* End of Initialising Graphics Drivers */
Thanks for reading.