Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. //trep.h
  2.  
  3. #include <map>
  4.  
  5. template <class type>
  6. typedef std::pair<Trep<type>, Trep<type>> TrepPair; //error!
  7.  
  8.  
  9. template <class type>
  10. class Trep {
  11.  
  12. public:
  13. type key;
  14. int priority, size;
  15. Trep *left, right;
  16.  
  17. Trep(type _key) :
  18. key(_key), priorty(rand()), size(1), left(NULL), right(NULL) {}
  19.  
  20.  
  21. TrepPair<type> splited(Trep &root, type key);
  22. Trep* insert(Trep &root, Trep &node);
  23.  
  24. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement