2016-07-27 117 views

回答

-1

不要这样做。

这个图书馆古老。如果您发现不支持它的系统,我不会感到惊讶。
使用任何的:

(好吧,你can do this,但请不要)

1

我得到了我的信息,从https://askubuntu.com/questions/525051/how-do-i-use-graphics-h-in-ubuntu ...

/* demo.c*/ 
#include<graphics.h> 
int main() 
{ 
    int gd = DETECT,gm,left=100,top=100,right=200,bottom=200,x= 300,y=150,radius=50; 
    initgraph(&gd,&gm,NULL); 
    rectangle(left, top, right, bottom); 
    circle(x, y, radius); 
    bar(left + 300, top, right + 300, bottom); 
    line(left - 10, top + 150, left + 410, top + 150); 
    ellipse(x, y + 200, 0, 360, 100, 50); 
    outtextxy(left + 100, top + 325, "C Graphics Program"); 

    delay(5000); 
    closegraph(); 
    return 0; 
} 

这似乎是graphics.h有一个定义DETECT变量,我假设将检测到您的默认宽度/高度。看看那个,我想你可能会找到你的答案。

相关问题