请问我的程序出了什么毛病?
#include <iostream.h>
#include <graphics.h>
#include <math.h>
const pi=3.1415926;
class turtle {
private:
float x,y,alpha;
public:
turtle(float,float,float);
void goahead(float);
void turn(float);
void koch(int,float);
};
turtle::turtle(float xp,float yp,float a)
{
x=xp;
y=yp;
alpha=a;
}
void turtle::goahead(float d)
{
moveto(x,y);
x+=d*cos(pi*alpha/180);
y-=d*sin(pi*alpha/180);
lineto(x,y);
}
void turtle::turn(float a)
{
alpha+=a;
}
void turtle::koch(int i,float lg)
{
if (i==0)
goahead(lg);
else {
koch(i-1,lg); turn(60);
koch(i-1,lg); turn(-120);
koch(i-1,lg); turn(60);
koch(i-1,lg);
}
}
void main(void)
{
int graphdriver=DETECT;
int graphmode;
initgraph(&graphdriver,&graphmode,"C:\\TC\\BGI");
cout<<"drawn by 4th order Koch Carve!\n";
cout<<"intput m=";
int m;
cin>>m;
turtle kame(200,300,0);
for (int i=0;i<m;i++)
{
kame.koch(m,1);
kame.turn(360.0/m);
}
}
Linking DRAWCL~1.EXE:
Linker Error: Undefined symbol _initgraph in module DRAWCL~1.cpp
Linker Error: Undefined symbol _lineto in module DRAWCL~1.cpp
Linker Error: Undefined symbol _moveto in module DRAWCL~1.cpp
请问我的程序出了什么毛病?请说详细点,给分!