forked from Light-City/CPlusPlusThings
-
Notifications
You must be signed in to change notification settings - Fork 1
/
container.cpp
43 lines (34 loc) · 714 Bytes
/
container.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
//
// Created by light on 19-12-16.
//
#include <iostream>
#include <map>
#include <set>
#include <vector>
#include "output_container.h"
using namespace std;
int main() {
map<int, int> mp{
{1, 1},
{2, 4},
{3, 9}};
cout << mp << endl;
vector<vector<int>> vv{
{1, 1},
{2, 4},
{3, 9}};
cout << vv << endl;
pair<int, int> p{1, 2};
cout << p << endl;
set<int> s{1, 2, 3};
cout << s << endl;
vector<char> v{'a', 'b'};
cout << v << endl;
set<char *> vs{"a", "b"};
cout << vs << endl;
map<int, char *> mm{
{1, "23"},
{2, "234hi"}
};
cout << mm << endl;
}