This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 7th, 2012  |  syntax: C++  |  size: 0.39 KB  |  views: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //A basic node class
  2. class BasicNode
  3. {
  4. public:
  5.         BasicNode* parent;
  6.         std::vector<BasicNode*> children;
  7.  
  8.         BasicNode();
  9.         ~BasicNode();
  10. };
  11.  
  12. //A node template class where nodes can have content
  13. template <typename T>
  14. class ContainerNode
  15. {
  16. public:
  17.         ContainerNode<T>* parent;
  18.         std::vector<ContainerNode<T>*> children;
  19.         T content;
  20.  
  21.         ContainerNode(void) { };
  22.         ~ContainerNode(void) { };
  23. };
clone this paste RAW Paste Data