Advertisement
Dijuna

kill meee

Nov 16th, 2016
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. class MyClass
  2. {
  3. public:
  4.     MyClass() {}
  5.     ~MyClass() { delete var1; delete var2; }
  6.  
  7. protected:
  8.     void* var1;
  9.  
  10. private:
  11.     void* var2;
  12. }
  13.  
  14. class MyClassA : public MyClass
  15. {
  16. public:
  17.     MyClassA : MyClass() {}
  18. }
  19.  
  20. class MyClassB : public MyClass
  21. {
  22. public:
  23.     MyClassB : MyClass() {}
  24.     ~MyClassB() { delete var3; }
  25.  
  26. private:
  27.     void* var3;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement