I want to access my Class' enum which inherited from it's base class but it gives error.
Says I must use Base::One
, not Extended::One
.
But another people don't know about the Base class, they just know the Extended class which I published with them.
How can I use Extended::One
to access all the base class' enums?
class Base {
public:
enum Type {
One,
Two
};
};
class Extended : Base {
};
int main() {
Extended::One; // ERROR: constant Base::One is inaccessible
return 0;
}