C语言做完图形后花屏是怎么回事?
要显示的是这样的界面,显示完后,要一个getch(),就退出去,退出程序后就成这样了。
本来应该有一句“press any key to exit”的,模糊不清了。
跑别人给的程序没问题。
我的代码:
#include <graphics.h>#include <conio.h>main () { int gdriver=VGA, gmode=VGAHI; initgraph(&gdriver, &gmode, "\\bgi"); setcolor (RED); rectangle(100,100,300,300); outtextxy (120, 120, "hello world"); getch(); printf ("press any key to exit!"); system ("exit");}