?
Solved

Turbo C++ 3.0 graphics

Posted on 2001-08-10
4
Medium Priority
?
1,756 Views
Last Modified: 2008-01-09
I have turbo C++ installed , but none of the graphics functions work, like initgraph.It gives linking errors.
0
Comment
Question by:vmr_iitm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Expert Comment

by:null_pointer
ID: 6372458
If u could give the error details and the code u are using

0
 
LVL 3

Expert Comment

by:sumant032199
ID: 6372557
I think you are getting an error:

Graphics error: Device driver file not found (EGAVGA.BGI)
Press any key to halt:

If it is so then follo this.
In initgraph() the last parameter is
"char far * pathtodriver"
generally we use "" in that field. Use the complete
path like "C:\\TC\\BGI". Don't forget to use double \\
or else copy your *.BGI files in directory from where you run your program.
0
 

Accepted Solution

by:
kartik earned 150 total points
ID: 6373385
Hi,
I think you have to change the setting in the TC environment before using the graphics.
If you can give the exact error message that you recieve then it would be easy to find the solution.
But I suggest you try out the following things:
1>Go to "Options" menu in that "Linker" option and in that "libraries" option. Make sure that "Graphics" is selected.
2>Then in the "Option" menu go to "Directories" option and in that make sure that you have mentioned the correct Include directories path and Lib path.
As for eg:
Include path:
"C:\Tc\Include"
Library path:
"C:\Tc\Lib"
3>Then make sure that in your program you have include the "Graphics.h" header file.
4>Then make sure that in the third parameter of InitGraph function you have specified the path of BGI file.
i.e InitGraph(&gd,&gm,"C:\\Tc\\BGI");
0
 

Author Comment

by:vmr_iitm
ID: 6378635
It was correct
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question