//************************************** // // main test file // // PROJECT NAME: LINK // // YOUR NAME: XYZ // YOUR ID: 1234 // YOUR EMAIL: xyz@cs.ucr.edu // //************************************** #include "link.h" int main(){ int i; list *L; cout << "THIS IS THE BEGINNING! \n"; // create new list L = new list; // add five element with value 1-5 for(i=1 ; i <= 5; i++) { L->addElement((element_type) i); } //print the list L->print(); cout << "\n"; // pop out one element from the list each time // and print out the list for(i=1 ; i <= 5; i++) { L->popElement(); L->print(); cout << "\n"; } return 0; }