Code

# include <graphics.h>
# include <conio.h>
# include <iostream.h>
void get_driver()
{
    int gDriver=DETECT,gMode;  // define variables
    initgraph(&gDriver,&gMode,"c:\\tc\\bgi");  // initialize graphics Library 
}
void main()
{
get_driver();  // To make function of define drivers
int color=getcolor();
cout<<"color updated by GETCOLOR()is "<<color;
outtextxy(200,100,"->.this is from outtext()before color change");
getch();
setcolor(RED);
outtextxy(200,200,"->. this is from outtext xy after color change");
getch();
closegraph();
}

OUTPUT

(Visited 1,031 times, 1 visits today)
Share with Friends :
Written by:

Leave a Reply

Your email address will not be published. Required fields are marked *