1
![Stack Overflow](http://sstatic.net/stackoverflow/img/apple-touch-icon.png)
You cannot access protected data via a pointer/reference to the base class. This is to prevent you from breaking the invariants that other derived classes may have on that data.
class parent
{
void f();
// let's pretend parent has these invariants:
// after f(), a shall be 0
// a...