I keep getting C2248 error messages in Visual Studio 2005. I have solved previous problems with this error, by creating an copy constructor for CMapLayer. The program is displaying and changing an SVG map. I have CMapLegend, CMapCategory and CMapLayer. These classes represent a legend for a map. The layers of the map are divided into categories.
For drawing the map I have:
inside CMapLegend::CreateLegend();Code:for(int iCount1 = 0; iCount1 < Categories.GetSize(); iCount1++) { CreateCategory(Categories.GetAt(iCount1)); for(int iCount2 = 0; iCount2 < Categories.GetAt(iCount1).GetNumberOfLayers(); iCount2++) { CreateLayer(Categories.GetAt(iCount1).GetLayerByIndex(iCount2)); } }
Code:class CMapLegend { public: CMapLegend(void); ~CMapLegend(void); void CreateLegend(void); void SetVisible(void); void SetInvisible(void); private: eSVG::CActiveXeSVG svgControl; CArray<CMapCategory, CMapCategory> Categories; CString sSvgId; eSVG::CElement CreateLayer(CMapLayer& mapLayer); eSVG::CElement CreateCategory(CMapCategory& mapCategory); };Code:class CMapLayer { public: CMapLayer(CString sName, CString sSvgId, CString sIconRef, bool bDisplay); CMapLayer(void); CMapLayer(const CMapLayer& mapLayer); CMapLayer operator=(const CMapLayer& mapLayer); ~CMapLayer(void); void SetVisible(void); void SetInvisible(void); CString GetName(void); CString GetSvgId(void); CString GetIconRef(void); bool GetDisplay(void); protected: eSVG::CActiveXeSVG svgControl; CString sName; CString sSvgId; CString sIconRef; bool bDisplay; };Code:class CMapCategory : public CMapLayer { public: CMapCategory(void); CMapCategory(const CMapCategory& mapCategory); ~CMapCategory(void); CMapCategory operator =(const CMapCategory& mapCategory); void SetLayersVisible(void); void SetLayersInvisible(void); void AddLayer(const CMapLayer& mapLayer); CMapLayer GetLayerById(void); int GetNumberOfLayers(void); CMapLayer GetLayerByIndex(int index); private: bool bExpanded; CArray<CMapLayer, CMapLayer> Layers; };



LinkBack URL
About LinkBacks



perator =' : cannot access private member declared in class 'CObject' C:\Program Files\Microsoft Visual Studio 8\VC\ce\atlmfc\include\afxtempl.h 324