Ana*_*ity 4 c c++ graphics codeblocks
我从以下站点设置了在CodeBlocks中执行图形代码所需的图形文件: -
http://www.codewithc.com/how-to-include-graphics-h-in-codeblocks
然后我尝试了这个示例代码.
#include <graphics.h>
int main( )
{
initwindow(400, 300, "First Sample");
circle(100, 50, 40);
while (!kbhit( ))
{
delay(200);
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
但是当我在代码块中运行代码时,我得到了这个


谁能解决我的问题?
这是因为graphics.hBorland的1989年BGI图形库是为16位MS DOS计算机开发的.但您使用的是64位Windows计算机.
解决方案:不要使用28岁的非标准库.