P
Peteroid
I'm trying to create an abstract base class with a pure virtual method
(using /clr and VS C++.NET 2005 Express). This will do the trick:
ref class baseClass
{
protected:
virtual void VMethod( ) abstract ; // i've tried '= 0' syntax too, no
luck
} ;
But, whenI try to create a child class, I can't figure out how to define the
virtual method to satisfy the compiler. That is, this doesn't work:
ref derivedClass : public baseClass
{
protected:
virtual void VMethod( ) {} // error
} ;
How do I do this correctly?
[==P==]
(using /clr and VS C++.NET 2005 Express). This will do the trick:
ref class baseClass
{
protected:
virtual void VMethod( ) abstract ; // i've tried '= 0' syntax too, no
luck
} ;
But, whenI try to create a child class, I can't figure out how to define the
virtual method to satisfy the compiler. That is, this doesn't work:
ref derivedClass : public baseClass
{
protected:
virtual void VMethod( ) {} // error
} ;
How do I do this correctly?
[==P==]