Sign in

gwj / po_oopc · Files

GitLab

  • Go to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • po_oopc
  • examples03
  • 01-list
  • testlist.cpp
  • Reformatted code
    c0b14c54
    Grzegorz Jabłoński authored
    2022-09-16 14:36:36 +0200  
    Browse Code »
testlist.cpp 307 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#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;
}