Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Offer Har
|
Jan 9, 2011 - 9:23 AM
|
Dear Support, I am trying to override this function, and get these errors:
1>c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(280) : error C2248: ’CObject::CObject’ : cannot access private member declared in class ’CObject’
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afx.h(558) : see declaration of ’CObject::CObject’
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afx.h(529) : see declaration of ’CObject’
1> This diagnostic occurred in the compiler generated function ’CGdiObject::CGdiObject(const CGdiObject &)’ Any idea why? all I did was returning my own font object Thanks, Ron.
|
|
Technical Support
|
Jan 11, 2011 - 8:20 AM
|
Could you show us the C++ class source code which generates the C2248 compiler error? We suspect your class uses a private class inheritance instead of the public one. I.e. probably you declared your grid class as: class TheClassB : TheClassA { . . . };
Instead of: class TheClassB : public TheClassA { . . . };
|
|
Offer Har
|
Jan 18, 2011 - 7:55 AM
|
Dear Support, Thanks - the problem was that I was trying to assign once CFont to another... the compiler is showing some error without specifying the row at which is assignment was taking place... very lame. Thanks, Ron.
|
|