画一条弧线
<P>#include <graphics.h> <BR>#include <stdlib.h> <BR>#include <stdio.h> <BR>#include <conio.h> </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(&gdriver, &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>
页:
[1]
