- 论坛徽章:
- 0
|
一下代码在TC-WIN(turbo-c)下编译
#include "stdio.h"
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(" ress 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;
}
出现一下编译错误:
错误 noname.c 7: 未定义的符号'DETECT'在 main 函数中
错误 noname.c 17: 未定义的符号'grOk'在 main 函数中
我是初学者,不懂为什么这样
望告知,谢谢 |
|