Skip to content

Commit bb9d461

Browse files
committed
added sample
1 parent 6aa2d27 commit bb9d461

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

lab6/lab6_1.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ int main()
1717
testMap01();
1818
testMap02();
1919
testMap03();
20+
testMap04();
2021

2122
testVector01();
2223
testVector02();

lab6/lab6_1.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ void testList07();
99
void testMap01();
1010
void testMap02();
1111
void testMap03();
12+
void testMap04();
1213

1314
void testVector01();
1415
void testVector02();

lab6/map.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ void testMap02()
3232
}
3333

3434
void testMap03()
35+
{
36+
std::map<std::string, int> mp;
37+
mp["One"] = 1;
38+
mp["Two"] = 2;
39+
40+
std::cout << "Four is" << mp["Four"] << std::endl;
41+
}
42+
43+
void testMap04()
3544
{
3645
std::map<std::string, int> mp =
3746
{

0 commit comments

Comments
 (0)