repl.it
@FishDeity/

8.11-ListADT

C++11

No description

fork
loading
Files
  • main.cpp
  • ListADT.cpp
  • ListADT.h
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>

using namespace std;

#include "ListADT.h"

int main() {
  ListADT list1, list2;

  for (int i=10; i>0; i--) { list1.push_back(i); }
  for (int i=1; i<=5; i++) { list2.push_front(i); }
  
  list1.print();
  list2.print();
  cout<<endl;

  list1.pop_front();
  cout<<endl;
  
  ListADT list3 = list2;
  list3.print();
  list2.print();
  cout << endl;

  list2.push_back(0);
  list2.push_back(-1);
  list3.print();
  list2.print();

  return 0;
}
Fetching token
?