testlist.cpp 261 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #include <iostream> using namespace std; #include "list.h" int main() { list l; l.insert(1); l.insert(2); l.insert(3); l.goToHead(); while(l.moreData()) { int val; val=l.getCurrentData(); cout << val << " "; l.advance(); } cout << endl; }