-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
51 lines (34 loc) · 1.02 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//============================================================================
// Name : main.cpp
// Author : Simone Kslash Angeletti
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include "CircularQueue.hpp"
using namespace std;
int main() {
cout << "!!!Circular Queue with Templates!!!" << endl; // prints !!!Hello World!!!
CircularQueue<int> Q (10);
cout << "Queue created:" << endl;
Q.display();
cout << "Head: " << Q.top() << endl;
cout << "Bottom: " << Q.getBottom() << endl;
cout << "pushing some data..." << endl;
Q.push(23);
Q.push(78);
Q.push(29);
Q.push(54);
Q.display();
cout << "Head: " << Q.top() << endl;
cout << "Bottom: " << Q.getBottom() << endl;
cout << "deleting some data(2)..." << endl;
//2
Q.pop();
Q.pop();
Q.display();
cout << "Head: " << Q.top() << endl;
cout << "Bottom: " << Q.getBottom() << endl;
return 0;
}