Quote Originally Posted by it4_saravana View Post
hai everybody

I tried to write a simple program which when compiled it will change the color of the Background to red and the code for that is
Code:
#include<conio.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tctemp\\bgi");
setbkcolor(4);
getch();
closegraph();
}
when i tried to compile its showing that
BGI Error: Graphics not Initialized ( use 'initgraph' )

when i checked no BGI named folder was there in c:\tctemp only but bgi.arc file was there what should i do to compile this program.

Please help me
Normal install is to the C:\TC\BGI directory. Normal include is "graphics.h"

Sounds like your install is not standard. Two ways to adjust it:

1) If you have all the files, then go into Options >> Directories, and tell the compiler where to find the files it needs.

2) If you don't have the files, or they aren't uncompressed, then go to Borland's archive web site. Frankly, I'd just d/l and install a new copy. Let it use the default directories for best results:

TC -for the executables
TC\BIN - for the IDE and your programs
TC\BGI - for graphics drivers, etc.
and so forth.