GIDForums  

Go Back   GIDForums > Computer Programming Forums > CPP / C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 03-Apr-2005, 14:09
C-LANG-BEGINNER C-LANG-BEGINNER is offline
New Member
 
Join Date: Apr 2005
Posts: 3
C-LANG-BEGINNER is on a distinguished road

Turbo C++ 4.5


I AM HAVING DIFFICULTY GETTING A PROGRAM TO EXECUTE.

THE PROGRAM REQUIRES BORLAND'S EGVGA.BGI GRAPHICS DRIVER.

HOWEVER, I DO NOT HAVE A BGI DIRECTORY IN TURBO++ 4.5.

HOW CAN I MAKE THIS PROGRAM EXECUTE?

HERE IS THE CODE:

CPP / C++ / C Code:
///////////////////////////////////////////////////////////////////////////////////////// 3DDEMO.CPP: Simple 3-D graphics drawing demonstration.
//                    Make sure that Borland's EGAVGA.BGI
//                    graphics driver is in the same directory
//                    as the program.
//////////////////////////////////////////////////////////////////////////////////////

#include <stdlib.h>
#include <conio.h>
#include <conio.h>
#include <iostream.h>
#include <graphics.h>

///////////////////////////////////////////////////////////////////////////////////////
// StartGraphics()
///////////////////////////////////////////////////////////////////////////////////////
void StartGraphics(void)
{
      int gdriver = VGA, gmode = VGAHI, errorcode;
      
      initgraph(&gdriver, &gmode, "");
      if ( (errorcode = graphresult()) !=grOk);
      {
          cout << "Graphics error: " << errorcode << '\n';
          getch();
          abort();
       }
}
Last edited by LuciWiz : 03-Apr-2005 at 23:39. Reason: Please insert your C code between [c] & [/c] tags
  #2  
Old 03-Apr-2005, 21:53
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,234
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all
Hey Beginner! Welcome to the forum.

Please don't shout, we can read you without all the caps.

Quote:
Originally Posted by C-LANG-BEGINNER
I AM HAVING DIFFICULTY GETTING A PROGRAM TO EXECUTE.

THE PROGRAM REQUIRES BORLAND'S EGVGA.BGI GRAPHICS DRIVER.

HOWEVER, I DO NOT HAVE A BGI DIRECTORY IN TURBO++ 4.5.

HOW CAN I MAKE THIS PROGRAM EXECUTE?
Let's see, "THE PROGRAM REQUIRES BORLAND'S EGVGA.BGI GRAPHICS DRIVER" and "I DO NOT HAVE A BGI DIRECTORY IN TURBO++ 4.5". Sounds like a problem. First, look in all the Borland subdirectories for EGAVGA.BGI. As it says in the code:
CPP / C++ / C Code:
//                    Make sure that Borland's EGAVGA.BGI
//                    graphics driver is in the same directory
//                    as the program.
you need to copy that file into the directory with your program. Simple as that.

And when you post code, please use code tags. Read the sticky at the top of this forum.
__________________

Cow: You're a lawyer too?
Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase!
 
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Turbo C++ 3.0 Unable to Open 'tclasss.lib' FeebleWizard CPP / C++ Forum 1 30-Nov-2004 11:20
keyboard events in turbo c++ Kilgayne CPP / C++ Forum 8 23-Jun-2004 13:46

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 16:50.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.