Anshul Jindal
2013-07-29 03:00:27 UTC
The following is a graphics program that was written in my book:
int gdriver=DETECT,gmode,errorcode;
int midx,midy,x;
initgraph(&gdriver, &gmode, "d:\\bc3\\bgi");
errorcode= graphresult();
if(errorcode!=grOk)
{
printf("Graphics error occured: %s \n", grapherrormsg(errorcode));
printf("Press any key to stop :");
getch();
exit(1);
}
for(x=15;x>=0;x--)
{
setcolour(x);
circle(20+(x*40),200,15);
getch();
}
cleardevice();
circle(200,200,50);
getch();
closegraph();
the error message says that the egavga.bgi file is missing.
I browsed the internet for solutions and the only one i got was to write "initgraph(&gdriver, &gmode, "c:\\tc\\bgi");"
I tried this too but failed.......
But I think that the reason for this is that i'm using windows 7 and the egavga.bgi file is stored in "C:\ TurboC++\ Disk\ TurboC3\ BGI\ Disk\ TurboC3\ BGI\ Disk\ TurboC3\ BGI"
There is actually no space between the file location.......
i got this location by searching for the file in my computer and opening the location
I don't know what to do....
Please help!!!