> Hi. I'm declaring a property on a base class that is represented by a
> pure virtual function. Something like this:
[quoted text clipped - 18 lines]
> Regards,
> Adriano.
> a property cannot be a pure virtual function
But it seems like there is a relatively simple workaround (which I
haven't tested):
public:
__declspec( property( get=DoGetWidth ) ) int Width;
int DoGetWidth() { return GetWidth(); }
virtual int GetWidth() = 0;
DoGetWidth could probably be private, since there is no good reason (in
this particular case) to expose it. DoGetWidth and GetWidth should
probably be const member functions.
>>Hi. I'm declaring a property on a base class that is represented by a
>>pure virtual function. Something like this:
[quoted text clipped - 13 lines]
>>
>>Is there a way to use a pure virtual function to represent a property?

Signature
David Olsen
qg4h9ykc5m@yahoo.com