-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
40 lines (31 loc) · 703 Bytes
/
Copy pathmain.cpp
File metadata and controls
40 lines (31 loc) · 703 Bytes
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
#include <iostream>
#include <string>
#include "BiRing.h"
using namespace std;
int main()
{
BiRing<int, string> br1;
br1.push_front(1,"one");
br1.push_front(2,"two");
br1.push_front(3,"three");
br1.push_front(4,"four");
br1.push_front(5,"five");
br1.push_front(6,"six");
BiRing<int, string>::iterator it = br1.begin();
BiRing<int, string>::iterator it2 = br1.begin();
it+=2;
br1.add(it,it2);
cout<<br1<<endl;
return 0;
}
//Expected console output for this rudimentary test is:
//[]
//[(1,one)]
//[(1,one)(2,two)]
//[(2,two)]
//[]
//[(1,uno)(2,due)(3,tre)(4,quattro)(5,cinque)]
//[]
//[(1,uno)(2,due)(5,cinque)]
//[(1,uno)(2,due)(5,cinque)]
//