用VC6.0++编程,出现“Cannot open include file: 'graphics.h': No such file or directory”错误提醒?

程序源代码:
#include<graphics.h>
main()
{
int driver,mode,i;
float j=1,k=1;
driver=VGA;
mode=VGAHI;
initgraph(&driver,&mode,"");
setbkcolor(YELLOW);
for(i=0;i<=25;i++)
{
setcolor(8)
circle(310,250,k);
k=k+j;
j=j+0.3;
}
}

graphics是Turbo特有的图形库!!
这个程序应该不是你自己写的吧?#include<graphics.h>是要包含graphics图形库,在VC6.0中是不能运行的哦,要是想运行必须使用Turbo2.0/3.0!

另外,最好不要随便的拷贝别人写的程序,尤其是很长的、自己没完全看懂的,我有过痛苦的经历:别人偷偷把病毒写在程序里,er我没发现...
温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-09-28
未找到graphics.h时就会提示该错误。
VC里没法用,graphics.h只能在tc或Bc里用,即使你把TC里面的Graphics.h拷贝到VC或miniGW目录下,编译也会出现一大堆错误。

这些东西一般很少用了现在。VC有它自己的图形库.
第2个回答  2010-09-28
“Cannot open include file: 'graphics.h': No such file or directory”
说明找不到graphics.h这个头文件
相似回答