Can graphics.h header work on 64bit windows?

北战南征 提交于 2020-05-09 10:32:27

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!