当前位置: 代码迷 >> C语言 >> 出现Graphics not initialized (use “initgraph”)
  详细解决方案

出现Graphics not initialized (use “initgraph”)

热度:660   发布时间:2008-04-02 16:06:30.0
出现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文件所在的目录的路径不对,但更改路径还是不行,请各位朋友帮帮忙.谢谢!~~~
搜索更多相关的解决方案: initgraph  initialized  Graphics  use  not  

----------------解决方案--------------------------------------------------------
#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;
      }
应该是路径问题,我的可以
----------------解决方案--------------------------------------------------------
  相关解决方案