Solved

Turbo C++ 3.0 graphics

Posted on 2001-08-10
4
1,737 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 50 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

705 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