fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Foo
  5. {
  6. public:
  7. Foo(){stuff();}
  8.  
  9. protected:
  10. void stuff(){std::cout << "hello world!" << std::endl;}
  11. };
  12.  
  13. int main() {
  14. Foo foo;
  15.  
  16. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
hello world!