class CBSplineCurve
{
public:
CBSplineCurve();
CBSplineCurve(const CBSplineCurve& other);
CBSplineCurve & operator = (const CBSplineCurve &src);
~CBSplineCurve(void); CPoint3DArray m_MotherPoint; //母点数组
CPoint3DArray m_CtrlPoint;//控制点数组
CdoubleArray m_U;//节点向量
double m_TotalChordLength;//总弦长
};CBSplineCurve::CBSplineCurve(void)
{
}CBSplineCurve::CBSplineCurve(const CBSplineCurve &src)
{
this->m_MotherPoint.Copy(src.m_MotherPoint);
this->m_CtrlPoint.Copy(src.m_CtrlPoint);
this->m_U.Copy(src.m_U);
this->m_TotalChordLength = src.m_TotalChordLength;
}CBSplineCurve& CBSplineCurve::operator =(const CBSplineCurve &src)
{
return CBSplineCurve(src);
}CBSplineCurve::~CBSplineCurve(void)
{
}但是我一用
CBSplineCurve obj;
obj.m_MotherPoint.Add(CPoint3D(-2,0.1,-2.1));CArray <CBSplineCurve,CBSplineCurve> m_LinePt1;
m_LinePt1.Add(&obj);错误:
1>d:\learnopengl\opengltest002\opengltest\bsplinecurve.cpp(122) : error C2664: “CArray<TYPE,ARG_TYPE>::Add”: 不能将参数 1 从“CBSplineCurve *”转换为“CBSplineCurve”
1>        with
1>        [
1>            TYPE=CBSplineCurve,
1>            ARG_TYPE=CBSplineCurve
1>        ]
1>        无构造函数可以接受源类型,或构造函数重载决策不明确
可是我已经重写的拷贝构造函数和运算符的重载了啊MFCVC++