蓝猪 发表于 2007-9-8 17:09

画一条弧线

<P>#include &lt;graphics.h&gt; <BR>#include &lt;stdlib.h&gt; <BR>#include &lt;stdio.h&gt; <BR>#include &lt;conio.h&gt; </P>
<P>int main(void) <BR>{ <BR>/* request auto detection */ <BR>int gdriver = DETECT, gmode, errorcode; <BR>int midx, midy; <BR>int stangle = 45, endangle = 135; <BR>int radius = 100; </P>
<P>/* initialize graphics and local variables */ <BR>initgraph(&amp;gdriver, &amp;gmode, ""); </P>
<P>/* read result of initialization */ <BR>errorcode = graphresult(); /* an error occurred */ <BR>if (errorcode != grOk) <BR>{ <BR>printf("Graphics error: %s\n", grapherrormsg(errorcode)); <BR>printf("Press any key to halt:"); <BR>getch(); </P>
<P>exit(1); /* terminate with an error code */ <BR>} </P>
<P>midx = getmaxx() / 2; <BR>midy = getmaxy() / 2; <BR>setcolor(getmaxcolor()); </P>
<P>/* draw arc */ <BR>arc(midx, midy, stangle, endangle, radius); </P>
<P>/* clean up */ <BR>getch(); <BR>closegraph(); <BR>return 0; <BR>} <BR>运行它为什么会出现这样的错误:Unable to open file "tclasss.lib" <BR></P>

高阁逆风 发表于 2007-9-17 14:17

<P>没有什么错误,很正确哦<BR>我是用WIN-TC的</P>

aihaoc 发表于 2007-9-28 19:57

呵呵我也运行了一下没问题的

wzhings 发表于 2007-10-19 14:03

<P>Dev C++下.complie 不能过...<BR>Win-Tc 倒是可以..[em03]</P>

大白免 发表于 2008-1-2 19:38

我也运行了一下没问题的

火乍弓单 发表于 2008-1-9 17:56

win-tc下可以的

页: [1]

编程论坛