Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. template<class T>
  2. class List<T> {
  3. class Node{
  4. T data;
  5. Node * next;
  6. ...
  7. };
  8. Node * head;
  9. ...
  10. ~List() {/*iterating through all nodes and deleting them*/}
  11. ...
  12. };
  13.  
  14. template<class T>
  15. class Tree<T> {
  16. class Node {
  17. Node * next;
  18. ...
  19. T key;
  20. List<int> internal_list;
  21. };
  22. destroy_node(Node * x) { delete x; }
  23. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement