fork(1) download
  1. #include <iostream>
  2. class Base
  3. {
  4. public:
  5. void PreLoad();
  6. virtual void Load()=0;
  7. };
  8.  
  9. void Base::PreLoad() {
  10. Load();
  11. }
  12.  
  13. class Derived : public Base {
  14. public:
  15. virtual void Load() {
  16. std::cout << "Hia" << std::endl;
  17. }
  18. };
  19.  
  20. int main()
  21. {
  22. Derived d = Derived();
  23. d.PreLoad();
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
Hia