i need to implement something similar...
CSpLine* CSdicap10Doc::AddSpLine(CArray<POINT,POINT>ControlPoints, CArray<POINT,POINT>Curvepoints)
{
CSpLine* pSpLine = new CSpLine(m_ControlPoints,m_CurvePoints);
m_oaSpLines.Add(pSpLine);
return pSpLine;
}
where ControlPoints and CurvePoints are
CArray <POINT,POINT> m_CurvePoints;
CArray <POINT,POINT> m_ControlPoints;
and m_oaSpLines is
CObArray m_ospLines;
The constructor is...
CSpLine::CSpLine(CArray<POINT,POINT>ControlPoints,CArray<POINT,POINT>CurvePoints)
{
m_ControlPoints = ControlPoints;
m_CurvePoints = CurvePoints;
}
The errors regards copy constructor and operator overloading...
error C2664: 'CSpLine::CSpLine' : cannot convert parameter 1 from 'class CArray<struct tagPOINT,struct tagPOINT>' to 'class CArray<struct tagPOINT,struct ta
gPOINT>'
No copy constructor available for class 'CArray<struct tagPOINT,struct tagPOINT>'
error C2582: 'CArray<struct tagPOINT,struct tagPOINT>' : 'operator =' function is unavailable
Can i solve the problem?
CSpLine* CSdicap10Doc::AddSpLine(CArray<POINT,POINT>ControlPoints, CArray<POINT,POINT>Curvepoints)
{
CSpLine* pSpLine = new CSpLine(m_ControlPoints,m_CurvePoints);
m_oaSpLines.Add(pSpLine);
return pSpLine;
}
where ControlPoints and CurvePoints are
CArray <POINT,POINT> m_CurvePoints;
CArray <POINT,POINT> m_ControlPoints;
and m_oaSpLines is
CObArray m_ospLines;
The constructor is...
CSpLine::CSpLine(CArray<POINT,POINT>ControlPoints,CArray<POINT,POINT>CurvePoints)
{
m_ControlPoints = ControlPoints;
m_CurvePoints = CurvePoints;
}
The errors regards copy constructor and operator overloading...
error C2664: 'CSpLine::CSpLine' : cannot convert parameter 1 from 'class CArray<struct tagPOINT,struct tagPOINT>' to 'class CArray<struct tagPOINT,struct ta
gPOINT>'
No copy constructor available for class 'CArray<struct tagPOINT,struct tagPOINT>'
error C2582: 'CArray<struct tagPOINT,struct tagPOINT>' : 'operator =' function is unavailable
Can i solve the problem?