B
blangela
A student of my class submitted a solution where a derived class had
the exact same member data declared as the abstract base class that it
inherited from. Surprisingly, MS VS 2005 did not complain about this.
Assuming this is "standard c++", why would the language allow this?
I have not had a chance to experiment to find out if it is only
allowed when the data members are private (which is what I suspect).
Also, it it allowed because the base class is an abstract base class?
What is the benefit of this "feature"? In other words, why would a
programmer want to do this?
Cheers,
Bob
the exact same member data declared as the abstract base class that it
inherited from. Surprisingly, MS VS 2005 did not complain about this.
Assuming this is "standard c++", why would the language allow this?
I have not had a chance to experiment to find out if it is only
allowed when the data members are private (which is what I suspect).
Also, it it allowed because the base class is an abstract base class?
What is the benefit of this "feature"? In other words, why would a
programmer want to do this?
Cheers,
Bob