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,023 times, 1 visits today)
Written by: