Link to home
Start Free TrialLog in
Avatar of muqaffa97
muqaffa97

asked on

problem with graphics.h

I try to make a graph and compile a line of :

#include <graphics.h>
main(){
 int gdriver = DETECT;
 int gmode;
 initgraph(&gdriver,&gmode,"");
 // a line command : make a line, outtextxy, etc
 closegraph();
}

but there is a message informed that compile process was fault :
"graphics.h(20,52):error directive:bgi graphics not supported under  
 windows."

please help me
Avatar of Salte
Salte

You are trying to use old DOS graphics library from Borland under Win32.

That simply won't work, try to use an old MS-DOS compiler such as Turbo C++ or some such.

Another possibility is to rewrite your code to use windows graphics but that will involve much rewriting. However, you do have the code in more modern fashion once you've done that.

Hope this is of help.

Alf
ASKER CERTIFIED SOLUTION
Avatar of e12voltsdac
e12voltsdac
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered: Points to e12voltsdac

Please leave any comments here within the next seven days. Experts: Silence
means you don't care.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

-bcl (bcladd)
EE Cleanup Volunteer