Thread: initializing the graphics driver.....

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    26

    Exclamation initializing the graphics driver.....

    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?
    "Borland Rocks!"

  2. #2
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164

    Re: initializing the graphics driver.....

    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
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

  3. #3
    Registered User
    Join Date
    Jul 2003
    Posts
    26
    oh, ok thanks...
    "Borland Rocks!"

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    ...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.

  5. #5
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164
    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.
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 07-28-2008, 03:10 AM
  2. Beginning Game Programming Type Books
    By bumfluff in forum Game Programming
    Replies: 36
    Last Post: 09-13-2006, 04:15 PM
  3. egavga.bgi
    By PING in forum Game Programming
    Replies: 6
    Last Post: 11-16-2004, 01:46 AM
  4. egavga.bgi problem
    By sunil21 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 09-22-2003, 05:06 PM
  5. Graphics Devices and Cprintf clash
    By etnies in forum C Programming
    Replies: 6
    Last Post: 05-09-2002, 11:14 AM