出现Graphics not initialized (use “initgraph”)
下面的程序在执行过程中出现Graphics not initialized (use “initgraph”) #include <graphics.h>
int main()
{
int gdriver, gmode;
gdriver=VGA;
gmode=VGAHI;
initgraph(&gdriver, &gmode, "c:\\tc");
bar3d(100, 100, 300, 250, 50, 1);
getch();
closegraph();
return 0;
}
在turboc2中没有出现,查资料说是egavga.bgi文件所在的目录的路径不对,但更改路径还是不行,请各位朋友帮帮忙.谢谢!~~~
----------------解决方案--------------------------------------------------------
#include <graphics.h>
int main()
{
int gdriver, gmode;
gdriver=VGA;
gmode=VGAHI;
initgraph(&gdriver, &gmode, "C:\\Win-TC\\projects");
bar3d(100, 100, 300, 250, 50, 1);
getch();
closegraph();
return 0;
}
应该是路径问题,我的可以
----------------解决方案--------------------------------------------------------