Managed VC++ compiler error

G

Guest

He everybody,

I am geting compiler error when trying to subclass managed C++ class. Here
is a code sample and the error itself.
Error:
error C2614: 'MDMessageNet::MDPing' : illegal member initialization:
'Object' is not a base or member
This diagnostic occurred in the compiler generated function
'MDMessageNet::MDPing::MDPing'

Code:
public __abstract __gc class MDBaseHdr
{
public:
MDBaseHdr(void);
// copy constructor
MDBaseHdr(MDBaseHdr & rhdr);

virtual ~MDBaseHdr(void);

virtual void Serialize( MDMessageNet::BinaryWriter* writer );
virtual void Deserialize( MDMessageNet::BinaryReader* reader );

__property void set_Size(int value) { header.bits.size = (value > 0) ?
value : 0; }
__property void set_Type(short value) { header.bits.type = value; }

private:
MD_MESSAGE_HDR header;
};

public __gc class MDPing : public MDBaseHdr
{
public:
MDPing();
virtual ~MDPing(void);

virtual void Serialize( MDMessageNet::BinaryWriter* writer );
virtual void Deserialize( MDMessageNet::BinaryReader* reader );

protected:
virtual void Init();

};

Thanks...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top