// ------------------------------------------------------------------------ // A cell contains a T* and a link. Cells are used to build lists. // A. Fischer June 13, 2000 file: cell.hpp // ------------------------------------------------------------------------ #pragma once #include #include "item.hpp" using namespace std; template class Linear; // ------------------------------------------------------------------------ template class Cell { friend class Linear; // friend ostream& operator<<( ostream& out, Cell& c); private: // ------------------------------------------------------------ T* data; Cell* next; Cell(T* e = NULL, Cell* p = NULL ): data(e), next(p){ } ~Cell(){ cout <<"\n Deleting Cell " < inline ostream& operator<<(ostream& out, Cell& c){c.print(out); return out;}