#include <graphics.h> <br />#include <stdlib.h> <br />#include <stdio.h> <br />#include <conio.h> <br /><br />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; <br /><br />/* initialize graphics and local variables */ <br />initgraph(&gdriver, &gmode, ""); <br /><br />/* read result of initialization */ <br />errorcode = graphresult(); /* an error occurred */ <br />if (errorcode != grOk) <br />{ <br />printf("Graphics error: %s
", grapherrormsg(errorcode)); <br />printf("Press any key to halt:"); <br />getch(); <br /><br />exit(1); /* terminate with an error code */ <br />} <br /><br />midx = getmaxx() / 2; <br />midy = getmaxy() / 2; <br />setcolor(getmaxcolor()); <br /><br />/* draw arc */ <br />arc(midx, midy, stangle, endangle, radius); <br /><br />/* clean up */ <br />getch(); <br />closegraph(); <br />return 0; <br />} //c语言库函数里的弧线函数<br /><br /><br />//是软件的问题还是操作有误 |
|