标题:在TC中运行一个画圆程序,出错,Graphics error:Device driver file not fo ...
取消只看楼主
qvbhsskg
Rank: 1
等 级:新手上路
帖 子:32
专家分:0
注 册:2005-4-28
 问题点数:0 回复次数:0 
在TC中运行一个画圆程序,出错,Graphics error:Device driver file not found
在运行画圆程序时出现,,

Graphics error:Device driver file not found <EGAVGA.BGI>

Press any key to halt: 我的源程序是:

#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; int radius = 100;

/* 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; setcolor(getmaxcolor());

/* draw the circle */ circle(midx, midy, radius);

/* clean up */ getch(); closegraph(); return 0; }

搜索更多相关主题的帖子: Graphics Device found driver error 
2005-04-28 13:15



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-16949-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015150 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved