|
|
Darren New <dne### [at] sanrrcom> wrote:
> You still get subclasses. And of course there's always the hack of declaring
> a subclass.
A subclass can't access the private members of the base class.
> Or just using compiler-specific hackage to access the variables.
That has been made rather difficult in practice. If you are *intentionally*
trying to break your program, then that's your choice, of course. However,
in normal usage it's useful if the compiler checks that you don't make
mistakes.
> or the infamous "#define private public".
Whether your program will link after that can depend on the compiler.
It's certainly not standard-conforming. And again, you are hacking on
purpose, trying to bypass the compiler checks, rather than using those
checks to catch your mistakes.
--
- Warp
Post a reply to this message
|
|