VS2019 Win10 运行报错 C4996 'moveto': This function is deprecated

0

报错 'moveto': This function is deprecated

'lineto': This function is deprecated 是为什么呢

#include <graphics.h>		// 引用图形库头文件
#include <conio.h>
int main()
{
	initgraph(640, 480);	// 创建绘图窗口,大小为 640x480 像素
	
	int x;
	moveto(80, 240);
	for (x = 80; x <= 560; x += 40)
	{
		lineto(x, 60);
		lineto(560, 240);
		lineto(x, 420);
		lineto(80, 240);
	}

	_getch();				// 按任意键继续
	closegraph();			// 关闭绘图窗口
	return 0;
}
ava
_Kyle

2021-3-9

已解决,安装EasyX_20200902版本就没有问题了 -  _Kyle  2021-3-9
0

这个只是警告,并不是错误,这样使用没有任何问题。

新版 EasyX 不推荐使用这组函数,如果想实现相似效果,将 moveto / lineto 修改为 line 即可。

ava
慢羊羊

2021-3-9

技术讨论社区