Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Cleardevice Function - Computer Graphics CG Program


Explanation:- void Cleardevice();
operation of the function is to clear the graph screen mode and set the current point (0,0). The clear screen is a screen to be filled with the background color in progress.

Note: Do not use clrscr in graphics mode.


#include
#include

main()
{
    int gd = DETECT, gm;
    initgraph(&gd, &gm, "C:\\TC\\BGI");

    outtext("Press any key to clear the screen.");
    getch();     
    cleardevice();     
    outtext("Press any key to exit...");  
    getch();  
    closegraph();     
  
    return 0;
}


This post first appeared on Ask For Program, please read the originial post: here

Share the post

Cleardevice Function - Computer Graphics CG Program

×

Subscribe to Ask For Program

Get updates delivered right to your inbox!

Thank you for your subscription

×