Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <conio.h>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. template <typename T>
  7.  
  8. class map {
  9.  
  10. public:
  11.  
  12. class pair {
  13.  
  14. public:
  15.  
  16. class keypair {
  17.  
  18. public:
  19. int* key = nullptr;
  20. };
  21.  
  22. class typepair {
  23. public:
  24. int* width = nullptr;
  25. };
  26.  
  27. pair* right = nullptr;
  28. pair* left = nullptr;
  29. typepair A;
  30. keypair B;
  31.  
  32. pair() {
  33.  
  34. B.key = nullptr;
  35.  
  36. A.width = nullptr;
  37.  
  38. right = nullptr;
  39.  
  40. left = nullptr;
  41.  
  42. }
  43.  
  44. pair(int* key, int* width) {
  45.  
  46. this->B.key = key;
  47.  
  48. this->A.width = width;
  49.  
  50. right = nullptr;
  51.  
  52. left = nullptr;
  53.  
  54. }
  55. pair P;
  56.  
  57. pair* root = nullptr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement