Showing posts with label Troubleshoot. Show all posts
Showing posts with label Troubleshoot. Show all posts

Wednesday, April 2, 2014

Errors in programs of computer graphics related to GRAPHICS.H

Some of the Errors Startup and New Programmers face while writing Graphics programs in C or C++  :

  • Messages like  " Cannot open include file < graphics.h > " .
  • Linker errors relating to < graphics.h > .
  • Messages like : Graphics not initialized .
To overcome the above errors and many others, try the following steps
  1. Copy the file [ egavga.bgi ] from the folder BGI to BIN folder 
  2. GoTo OPTIONS >   LINKER > LIBRARIES and mark the Graphics option
  3. Use int gdriver , gmode = DETECT;  initgraph( &gdriver, &gmode, "" ) ;                       before writing any graphics code ;