fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Common
  5. {
  6. void print() {
  7. cout << "hello\n";
  8. }
  9. };
  10.  
  11. struct Foo : private Common
  12. {
  13. using Common::print;
  14. };
  15.  
  16. int main()
  17. {
  18. Foo p;
  19. p.print();
  20. return 0;
  21. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
hello