Discussion:
CArray Problem and error C2248 cannot access private member in class CObject
(too old to reply)
Tony C.
2009-12-17 03:36:39 UTC
Permalink
Hi Again,

I am trying to use the CArray Classt with a Custom Class I use in
my program.

here is my declaration:

public:

CArray <CPlanet,CPlanet&> myPlanets;

CPlanet is just a normal object not derived from any other classes.

I'm getting a :
*****************************************************
error C2248: 'CObject::operator =' : cannot access private member
declared in class 'CObject' c:\Program Files\Microsoft Visual
Studio 9.0\VC\atlmfc\include\afxtempl.h 267 AstroCalcVC1
****************************************************

I'd like to use the CArray Class and not shy away from it just because
I can't get it to compile. It looks pretty useful.


Any ideas? Do I a need a copy constructor or something like that?
If it is trying to call a function(like a copy constructor) in
CObject which might be private, What do I do then?

Thanks Again.

Tony C.

I feel like I should at least buy treats or something for the group...
:)
Tony C.
2009-12-17 03:38:54 UTC
Permalink
Sorry Disregard...

Wrong group....

Tony C.

Loading...