Advertisement
Guest User

Untitled

a guest
May 26th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. class Foo
  4. {
  5. public:
  6.     void Run()
  7.     {
  8.         std::cout << "Running...." << std::endl;
  9.         this->Init();
  10.         std::cout << "Run finished!" << std::endl;
  11.         m_run = true;
  12.     }
  13.  
  14. protected:
  15.     bool m_run;
  16.  
  17.     void Init()
  18.     {
  19.         std::cout << "Primary init..." << std::endl;
  20.     }
  21. };
  22.  
  23. int main()
  24. {
  25.     Foo* f = 0;
  26.     f->Run();
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement