Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. ---------------------------- Original.h
  2.  
  3. class Original {
  4. public:
  5.     Original(int x);   
  6. };
  7.  
  8. ---------------------------- Original.cpp
  9.  
  10. Original::Original(int x) {
  11.     /// Do some stuffs
  12. }
  13.  
  14. ---------------------------- CopyCat.h
  15.  
  16. class CopyCat : public Original {
  17.     CopyCat() : Original(69) { /// Huehuehue 69
  18.          /// Empty constructor calling original
  19.     }
  20. };
  21.  
  22. ----------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement