fork download
  1. #include <iostream>
  2.  
  3. class Base {
  4. protected:
  5. void hello() { std::cout << "Hello\n"; }
  6. };
  7.  
  8.  
  9. class A: public Base {
  10. public:
  11. using Base::hello;
  12. };
  13.  
  14. int main(){
  15. A a;
  16. a.hello();
  17. return 0;
  18. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
Hello