when I write any code using a functin in <garphics.h> ,compiler givs o error.
But,following error occurs on user screen:EGAVGA.BGI file not found by Graphics driver
Can anyone give me solution?
and alternative is to use the current version of Code::Blocks EDU-Portable (Codeblocks-EP) from http://codeblocks.codecutter.net .It has templates for WinBGIm projects installed and all the necessary libraries pre-installed. In Codeblocks-EP just start [File]->[New]->[Project]->[WinBGIm Project]. You'll be able to choose a graphics-only project type, or one with an extra console for standard input/output if you wish.
I think he must be using an older compiler that supports it, as the error message happens when InitGraph() cannot find the device driver.
In order for the BGI graphics to work, one of the graphics driver files must be loaded. Make sure you put a copy of the EGAVGA.BGI file in the same directory as your program's executable.