C语言用TC切换图形模式报"未定义符号'"......

来源:百度知道 编辑:UC知道 时间:2024/05/10 20:16:57
#include <stdio.h>
#include "graphics.h"

main()
{
int i;
int sea=CGA,level=0;
initgraph(&sea,&level,"");
moveto(0,200);
for(i=0;i<10;i++)
{
setcolor(i);
linerel(20,0);
}
getch();
clisegraph();
}

//行了,在我的机器上TurboC2.0调试通过了,效果不错
#include <stdio.h>
#include<graphics.h>
#include<string.h>
void main(void)
{
int i;
int sea=CGA,level=0;
initgraph(&sea,&level,"");
moveto(0,200);
for(i=0;i<10;i++)
{
setcolor(i);
linerel(20,0);
}
getchar();
restorecrtmode();
}