File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ Tested on 7.7.1 unless mentioned otherwise.
21
21
1 . [ define] ( define.c )
22
22
1 . [ stderr ignore] ( stderr_ignore.c )
23
23
1 . C++ features
24
+ 1 . [ Containers] ( container.cpp )
24
25
1 . [ Overload] ( overload.cpp )
25
26
1 . [ Method] ( method.cpp )
26
27
1 . [ Polymorphism] ( polymorphism.cpp )
Original file line number Diff line number Diff line change
1
+ /*
2
+ - https://stackoverflow.com/questions/11606048/how-to-pretty-print-stl-containers-in-gdb
3
+ - https://stackoverflow.com/questions/253099/how-do-i-print-the-elements-of-a-c-vector-in-gdb
4
+ - https://stackoverflow.com/questions/427589/inspecting-standard-container-stdmap-contents-with-gdb
5
+ */
6
+
7
+ #include < map>
8
+ #include < utility>
9
+ #include < vector>
10
+
11
+ int main () {
12
+ std::vector<int > v;
13
+ v.push_back (0 );
14
+ v.push_back (1 );
15
+ v.push_back (2 );
16
+ std::map<int ,int > m;
17
+ m.insert (std::make_pair (0 , 0 ));
18
+ m.insert (std::make_pair (1 , -1 ));
19
+ m.insert (std::make_pair (2 , -2 ));
20
+ }
You can’t perform that action at this time.
0 commit comments