一个非常非常奇怪的问题????
请看以下代码有什么错误???
class TLineLeastSquares
{private:
//原始数据项
int FValueCount;
//原始数据X和Y值
double *FX, *FY;
//解后的k和b的值
double FK, FB;
protected:
//由于考虑到直线可能是由指数函数变换而来
//获取x和y值为虚函数,可能需要进行一定量
//的计算
virtual double GetXValue( int XIndex);
virtual double GetYValue( int YIndex);
public:
TLineLeastSquares()
{FValueCount = 0;
FK = 0;
FB = 0;
FX = NULL;
FY = NULL;
}
~TLineLeastSquares()
{if( FX != NULL)
delete []FX;
if( FY != NULL)
delete []FY;
}
//进行拟合
void Calculate( void);
//设置原始数据
void SetSourceData( int AValueCount, double *XValue, double YValue);
__property double K = { read = FK};
__property double B = { read = FB};
__property int ValueCount = { read = FValueCount};
};
编译居然报 virtual double GetYValue( int YIndex);处 E2293 ) expected错误。
why????
在C++ Builder 6中编译