个人菜单
技术支持
我的问题
r211回答(0条)   2007-08-05 14:14:43
问题描述:bad?
r211 蓝屏问题回答(0条)   2007-08-05 14:04:49
问题描述:我用turboc2.0编写c语言程序,一有图形操作就蓝屏,无法退回windows下,只能强制关机,同样的程序(如下),在别人的电脑上都能顺利的编译运行,只有我的会蓝屏,这是怎么回事?我的电脑是方正r211-400. #include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> int main(void) { /* request auto detection */ int gdriver = DETECT, gmode, errorcode; int midx, midy, i; /* initialize graphics and local variables */ initgraph(&gdriver, &gmode, ""); /* read result of initialization */ errorcode = graphresult(); if (errorcode != grOk) /* an error occurred */ { printf("Graphics error: %s\n", grapherrormsg(errorcode)); printf("Press any key to halt:"); getch(); exit(1); /* terminate with an error code */ } midx = getmaxx() / 2; midy = getmaxy() / 2; /* loop through the fill patterns */ for (i=SOLID_FILL; i<USER_FILL; i++) { /* set the fill style */ setfillstyle(i, getmaxcolor()); /* draw the bar */ bar(midx-50, midy-50, midx+50, midy+50); getch(); } /* clean up */ closegraph(); return 0; }