编程语言
首页 > 编程语言> > C4996 'getch': The POSIX name for this item is deprecated. Instead, use the ISO C and C++

C4996 'getch': The POSIX name for this item is deprecated. Instead, use the ISO C and C++

作者:互联网

#include <graphics.h>        //引用图形库
#include <conio.h>
void main()
{
    initgraph(640, 480);    //和TC有区别
    circle(200, 200, 100);    //画圆, 圆心(200,200),半径 100
    getch();                //按任意键继续
    closegraph();            //关闭图形界面
}

方法1:

  将 getch 改成 _getch  即可编译通过

 

方法2:

属性页 -> C/C++ -> 常规 里   SDL检查  改成否 即可编译通过

 

标签:getch,200,use,name,C++,100,include
来源: https://www.cnblogs.com/HunterK/p/12341390.html