closegraph deallocates all the allocated Memory of the Graphics system. It then restores the screen to the mode it was in before you called initgraph. (The graphic system released the memory, such as pilots, sources and an internal buffer, through a call to _graphfreemem.)
Statement: void closegraph();
Statement: void closegraph();
#include
#include
main()
{
int gd = DETECT, gm;
initgraph(&gd, &gm, "C:\\TC\\BGI");
outtext("Press any key to close the graphics mode.");
getch();
closegraph();
return 0;
}
#include
main()
{
int gd = DETECT, gm;
initgraph(&gd, &gm, "C:\\TC\\BGI");
outtext("Press any key to close the graphics mode.");
getch();
closegraph();
return 0;
}