在输入rectangle函数式出现存储异常的错误
#include
#include
#include
#include
void UI_GameView()//自定义函数
{
cleardevice;//清屏函数
rectangle(10, 10, 312, 615);//画长方形函数 左上坐标 x,y 右下坐标 x,y
}
int main()
{
UI_GameView();
system("pause");
return 0;
}
报错如下
望采纳!!
cleardevice 函数是不是缺少括号?
应该用 cleardevice() 吧?
如果 cleardevice 就是这样用的,那么未经处理的异常,你就需要 try/catch 捕获住 rectangle 这个异常才行
不是 rectangle 的错误, 是 cleardevice 少了括号。
// cleardevice function
cleardevice();
改成rectangle(312, 615,10,10)试试