Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- class Base {
- public:
- void imprimir() {std::cout << "Base!" << '\n';};
- };
- class Derivada1 : protected Base {};
- class Derivada2 : public Derivada1 {
- public:
- void imprimir_aux() {
- imprimir();
- };
- };
- int main() {
- Derivada2 d;
- d.imprimir_aux();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement