• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1816
  • Last Modified:

Turbo C++ 3.0 graphics

I have turbo C++ installed , but none of the graphics functions work, like initgraph.It gives linking errors.
0
vmr_iitm
Asked:
vmr_iitm
1 Solution
 
null_pointerCommented:
If u could give the error details and the code u are using

0
 
sumant032199Commented:
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
 
kartikCommented:
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
 
vmr_iitmAuthor Commented:
It was correct
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now