注册 登录
编程论坛 C图形专区

画一条弧线

蓝猪 发布于 2007-09-08 17:09, 1928 次点击

#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int midx, midy;
int stangle = 45, endangle = 135;
int radius = 100;

/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "");

/* read result of initialization */
errorcode = graphresult(); /* an error occurred */
if (errorcode != grOk)
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();

exit(1); /* terminate with an error code */
}

midx = getmaxx() / 2;
midy = getmaxy() / 2;
setcolor(getmaxcolor());

/* draw arc */
arc(midx, midy, stangle, endangle, radius);

/* clean up */
getch();
closegraph();
return 0;
}
运行它为什么会出现这样的错误:Unable to open file "tclasss.lib"

5 回复
#2
高阁逆风2007-09-17 14:17

没有什么错误,很正确哦
我是用WIN-TC的

#3
aihaoc2007-09-28 19:57
呵呵我也运行了一下没问题的
#4
wzhings2007-10-19 14:03

Dev C++下.complie 不能过...
Win-Tc 倒是可以..

#5
大白免2008-01-02 19:38
我也运行了一下没问题的
#6
火乍弓单2008-01-09 17:56
win-tc下可以的
1