Search This Blog


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 <graphics.h>
#include <conio.h>

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

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

No comments:

Post a Comment