程序为什么执行后提示内存不能read啊(EasyX)
#include<graphics.h>#include<conio.h>
void main()
{
int x=320;
setcolor(YELLOW);
setfillstyle(GREEN);
fillellipse(x,240,20,20);
char c;
while(c!=27)
{
c=getch();
setcolor(BLACK);
setfillstyle(BLACK);
fillellipse(x,240,20,20);
switch(c)
{
case 'a': x-=2;break;
case 'd':x+=2;break;
case 27:break;
}
setcolor(YELLOW);
setfillstyle(GREEN);
fillellipse(x,240,20,20);
Sleep(10);
}
closegraph();
}