K
keith
Forgive me if this an FAQ; I did look, but couldn't find it, so...
I know that if I declare a method virtual in the base class, then at
run time my derived class version will be called. How do I do
something sort of similar with a member variable?
What I mean is that I have a context struct in my base class, which a
(non-virtual) method twiddles with. What I would like is the overload
the context struct in the derived class, and have the base class
method twiddle with the derived class context struct.
If you see what I mean.
(I think you can guess I'm rather new to this C++ thingy!)
I know that if I declare a method virtual in the base class, then at
run time my derived class version will be called. How do I do
something sort of similar with a member variable?
What I mean is that I have a context struct in my base class, which a
(non-virtual) method twiddles with. What I would like is the overload
the context struct in the derived class, and have the base class
method twiddle with the derived class context struct.
If you see what I mean.
(I think you can guess I'm rather new to this C++ thingy!)