// node.h // revised 10 sep 04 by tom bailey // Declare and define methods for a Node struct. // A struct is much like a class except that the default // access mode is public. In a Node, everything is // public. The constuctor and destructor are verbose // for easier tracing. #pragma once #include using std::cout; using std::endl; struct Node { double store; Node * link; // Post: this Node contains the field values // aStore and aLink. Node( double aStore, Node * aLink ) : store( aStore ), link( aLink ) { cout << "Node with store, link = " << store << ", " << link << "constructed at " << & store << endl; } // Post: The Node has been destroyed. // note: usually called by delete *Node processing; // only one Node is deleted, if link isn't NULL // the rest of the linked list is still allocated. ~Node() { cout << "Node with store, link = " << store << ", " << link << " destructed at" << & store <