-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
57 lines (46 loc) · 1.04 KB
/
Main.cpp
File metadata and controls
57 lines (46 loc) · 1.04 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include <iostream>
#include <string>
#include "LinkedList.h"
#include "LinkedList.cpp"
int main()
{
// example uses
//Memory leak check:
/*std::string name;
while (std::cin >> name)
{
LinkedList<std::string> name;
for(int i = 0; i < 20; i++)
name.Push("testing");
}*/
LinkedList<std::string> myList;
std::string text = "";
myList.Pop(text);
myList.Push("1st", true);
myList.Append("3rd", true);
myList.Insert("2nd", 1, true);
myList.Print();
myList.TailPrint();
myList.Remove(3, true);
myList.Remove(0, true);
myList.Push("1st", true);
myList.Print();
myList.Remove(2, true);
myList.Print();
myList.Pop(true);
myList.Append("4th", true);
myList.Insert("3rd", 2, true);
myList.Print();
myList.Insert("new", 0, true);
myList.Print();
myList.Pop(text, true);
std::cout << "The data stored in my variable 'test' is: " << text << std::endl;
myList.Print();
/*LinkedList<int> numberList;
numberList.Push(100);
numberList.Insert(200, 3);
numberList.Print();
numberList.TailPrint();*/
std::cin.get();
return 0;
}