-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.cpp
64 lines (48 loc) · 1.08 KB
/
test.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
52
53
54
55
56
57
58
59
60
61
62
63
64
#include "class2.h"
void test1()
{
rational<int> ty(20.5,23.8);
ty.div(2.1, 3.4);
ty.mul(2.9, 4.8);
// ty.mun(10, 23);
ty.compar(10, 23);
ty.relation();
ty.print();
}
void test2()
{
List<int> lst;
List<char> lsr;
lst.push_front(11);
lst.push_front(99);
lst.push_front(88);
for (int i = 0; i < lst.GetSize(); i++) // âûâîä äàííûõ
{
cout << lst[i] << endl;
}
cout << endl << "pop_back " << endl << endl;
lst.pop_back();
for (int i = 0; i < lst.GetSize(); i++)
{
cout << lst[i] << endl;
}
cout << endl << "insert " << endl << endl;
lst.insert(44, 2);
for (int i = 0; i < lst.GetSize(); i++)
{
cout << lst[i] << endl;
}
lst.removeAt(2);
cout << endl << "removeAt " << endl << endl;
for (int i = 0; i < lst.GetSize(); i++)
{
cout << lst[i] << endl;
}
}
int main()
{
setlocale(LC_ALL, "Russian");
test2();
cout << "Error" << endl;
return 0;
}