Guest User

Untitled

a guest
Apr 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1.  
  2. #ifndef RefCountT_H
  3. #define RefCountT_H
  4.  
  5.  
  6. #include <iostream>
  7. #include <string>
  8.  
  9. using namespace std;
  10.  
  11. template <class T>
  12. class RefCountT {
  13. private:
  14. T *ptr;
  15. int count;
  16. public:
  17. RefCountT();
  18. ~RefCountT();
  19. RefCountT(RefCountT & r);
  20. void operator=(RefCountT & r);
  21.  
  22. void inc();
  23. void dec();
  24. bool zeroCount();
  25. T getVal();
  26. void setVal( T val);
  27. };
  28.  
  29.  
  30. #endif
Add Comment
Please, Sign In to add comment