// ------------------------------------------------------------------------ // Unsorted list: derived from Container-<--Linear-<--List // A. Fischer June 9, 2001 file: list.hpp // ------------------------------------------------------------------------ #pragma once #include "linear.hpp" #include "item.hpp" // ------------------------------------------------------------------------ template class List : public Linear { public: void insert( Cell* cp ) { Linear::reset(); Linear::insert(cp); } // -------------------------------------------------------------------- void focus(){ int k; cout <<"\n What key would you like to remove? "; cin >> k; for (Linear::reset(); !Linear::end(); ++*this) { const T* thisItem = *this; // the current item in the Linear if ( *thisItem == k) break; } } };