类定义的问题,求教
部分代码:class CLine
{
public:
CLine(){}
CLine(float X1=0,X2=0,Y1=0,Y2=0)
{
x1=X1; x2=X2; y1=Y1; y2=Y2;
}
void Length()
{
int k;
k= sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
cout<<k<<endl;
}
void show()
{
cout<<'('<<x1<<','<<y1<<')'<<endl;
cout<<'('<<x2<<','<<y2<<')'<<endl;
}
private:
float x1;
float x2;
float y1;
float y2;
};
error C2629: unexpected 'class CLine (';
error C2334: unexpected token(s) preceding '{'; skipping apparent function body;
这到底是哪儿出错了??