PDA

View Full Version : initializing the graphics driver.....



nold
07-26-2003, 04:57 PM
I have a Turbo C editior with a graphics library all for DOS. Befor I
can use the library I must initialize it with the initgraph() func. It has three parameters, first the driver(I set to auto detect), second the mode(I set to 256 color), the one that has me stumped is the last one wich is the path to driver. Does anyone know what to pass as the path?

WaltP
07-27-2003, 02:50 AM
Originally posted by nold
I have a Turbo C editior with a graphics library all for DOS. Befor I
can use the library I must initialize it with the initgraph() func. It has three parameters, ..., the one that has me stumped is the last one wich is the path to driver. Does anyone know what to pass as the path?

It's the path to the .BGI files that came with Borland

nold
07-27-2003, 06:41 AM
oh, ok thanks...

VirtualAce
07-28-2003, 11:04 AM
...But in your path you must have double backslashes seperating the directories.

"c:\\graphics\\egavga.bgi"

For some reason older compilers did not parse DOS paths correctly and you must have double backslashes instead of sigle. I know that Turbo C++ suffers from this, but Borland 4.52 and up do not.

WaltP
07-28-2003, 11:17 PM
Originally posted by Bubba
...But in your path you must have double backslashes seperating the directories.

"c:\\graphics\\egavga.bgi"

For some reason older compilers did not parse DOS paths correctly and you must have double backslashes instead of sigle. I know that Turbo C++ suffers from this, but Borland 4.52 and up do not.
Actually, all compilers suffer with this malady. Including Borland 5.5. The \ defines an escape character and cannot be used singly in a string.