C++ Programming - Using Declarations for Access Control


class A {
private:
int a;
protected:
int b;
public:
int c;
}
class B: private A {
using B::b;
using B::c;
}


This gives access to B::b and B::c but not B::a.

Labels:


About this entry