小龙Dev-C++报错

0

小龙Dev-C++ 自带EasyX 报错 windows系统https://devcpp.gitee.io/manual/support-easyx.html

报错:

在此函数中: 'int main()':

12 2  [错误] 'getch' 未在此范围内声明

12 2  [注解] 建议替换为: 'gety'

#include <easyxgraphics.h>  //<graphics.h>
#pragma comment(lib, "libEasyX libgdi32 libole32")

int main() {

	int width = 900, height = 600;

	initgraph(width, height); //Init EasyX graphic window

	circle(width / 2, height / 2, 200);

	getch();

	closegraph();

	return 0;

}

ava
vcxzgf

2022-11-2

0

使用 getch() 函数需要引入头文件 conio.h。

ava
慢羊羊

2022-11-2

技术讨论社区
相关提问