#ifndef _NODE #define _NODE #include using namespace std; class Node { friend class Queue; friend class Stack; friend class List; friend class Partition; friend ostream &operator<<(ostream&, Node*); Node *parent; // To support inverted trees int size; // To support invertes trees - # nodes in subtree void *object; // Object carried by the node Node *next; // The next node in a list of nodes public: Node(void*, Node*); // Set the carried object and the next Node in chain Node(void*); // Set the carried object, next gets NULL void *getObject(); // Return carried object Node *identify(); // Return representative Node object }; #endif