Solved

Turbo C++ 3.0 graphics

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now