//node.cpp //Implementation of member functions of Node #include"node.h" Node::Node(int i, Node * n): //data initialized theData(i), theNext(n) //If your member data is an object of another class, //you may specify which constructor to call. {cout << "making a node, data=" << i << endl;} //Only use this body for debugging. //Replace with {;} //***************************************************** Node::~Node() {cout << "destroying a node, data=" << theData << endl;} //Only use this body for debugging. //Replace with {;} //***************************************************** Node::setNext(Node * n) {theNext = n;} //***************************************************** Node * Node::getNext() {return theNext;} //***************************************************** int Node::getData() {return theData;} //***************************************************** ostream& operator<<(ostream& out, Node& n) { out << n.theData; return out; } //***************************************************** istream& operator>>(istream& in, Node& n) { in >> n.theData; return in; }