c++ MFC,我在类中建立一个静态函数,为什么不能调用其他函数呢?
我的函数的声明如下:classCDoubleDiff{public:staticPara*GetPara(double*Lo1,double*Lo2,XYZ*LP1,XY...
我的函数的声明如下:
class CDoubleDiff
{
public:
static Para *GetPara(double *Lo1, double *Lo2,XYZ *LP1,XYZ *LP2,int num,double px1,double py1,double pz1,double px2,double py2,double pz2);
static XYZ * SPLength(SL*same,XYZ*AA,int num);
CDoubleDiff();
virtual ~CDoubleDiff();
protected:
double * GetLength(XYZ *p,int num,double px,double py,double pz);
};
我在GetPara函数中,调用GetLength。会出错,这是为什么呢?
报错结果为:'CDoubleDiff::GetLength' : illegal call of non-static member function 展开
class CDoubleDiff
{
public:
static Para *GetPara(double *Lo1, double *Lo2,XYZ *LP1,XYZ *LP2,int num,double px1,double py1,double pz1,double px2,double py2,double pz2);
static XYZ * SPLength(SL*same,XYZ*AA,int num);
CDoubleDiff();
virtual ~CDoubleDiff();
protected:
double * GetLength(XYZ *p,int num,double px,double py,double pz);
};
我在GetPara函数中,调用GetLength。会出错,这是为什么呢?
报错结果为:'CDoubleDiff::GetLength' : illegal call of non-static member function 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询