Click to See Complete Forum and Search --> : virtual property
ncm
August 21st, 2003, 01:42 AM
I created virtual property in my base class and overloaded it in the inherited class. The property worked correct with the "=" operator but when I used the "+=" operator its allways calling to the base class "set" property. (even when the pointer point to the inharited class).
SeventhStar
August 22nd, 2003, 07:14 AM
paste some code.... I'm not sure what you're saying :rolleyes:
MooNull
August 23rd, 2003, 01:26 AM
Is it something like this:
__gc class Something
{
public :
virtual _property set_Whatever(Stuff) { PrivateMember = Stuff; }
};
__gc class DerivedSomething
{
public :
_property set_Whatever(Stuff) { PrivateMember = Stuff; }
};
DerivedSomething *AnInstance = new DerivedSomething();
AnInstance->set_Whatever(Stuff);
And it calls the virtual method of the Something class... instead of the real set_Whatever() function in the DerivedSomething class...?
SeventhStar
August 23rd, 2003, 11:06 AM
i suppose the second clss looks like this:
__gc class DerivedSomething : public Something
{
public :
_property set_Whatever(Stuff) { PrivateMember = Stuff; }
};
if not fix it... and if yes... I dunno sorry
:rolleyes:
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.