2016-07-27 10 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變量,我假設將檢測到您的默認寬度/高度。看看那個,我想你可能會找到你的答案。