class base {
protected:
base() {}
};
class der1 : virtual private base {
public:
der1() {}
};
class der2 : public der1
{
public:
der2() {}
};
int main() {
der2 d;
}
It gives compile time error: 'base::base' : cannot access inaccessible member declared in class 'base'
But base class constructor is define publically it compiles.
Pls anyone can give explaination?