问题
I installed graphics.h library on Dev-C++ but it wont run my code as it gives me this error in the compiler:
int left=0,
int right=0,
int right=INT_MAX,
int bottom=INT_MAX,
Here's my code:
#include <graphics.h>
void main( )
{
initwindow(800, 800, "line");
line(200,200,200,600);
getch();
}
They told me graphics.h
can't work on 64-bit windows... Is that right?...
回答1:
WinBGIm is a 32-bit library only. There were no 64-bit version of Windows (except for the Itanium) when it was written.
回答2:
If anyone download this from the official site, open the graphics.h in any text editor, and exactly at line 303:
int left=0, int right=0, int right=INT_MAX, int bottom=INT_MAX
change the second right
to top
(redeclaration error).
This library will only run on x32 bit compilers. So if you're running something ancient like Bloodshed DevC, Turbo C, or CodeBlocks, then you're fine. But if you're using Visual Studio and your assigments force you to use that library, then good luck making that happen.
来源:https://stackoverflow.com/questions/53481040/can-graphics-h-header-work-on-64bit-windows