5 ms·
Unfortunately, the "new" keyword can override functionality.
by kmkemp 8y ago
Unfortunately, the "new" keyword can override functionality.
- ygra 8y agoIt cannot, really. It can only shadow the old declaration (and isn't even necessary). This means if you have Derived : Base with such a shadowed member, then code from the library that uses a Base cannot call your shadowing member. You can't really change behaviour that way, nor break anything, except for yourself.