This commit is contained in:
Light-City
2020-01-08 21:50:12 +08:00
parent fe2587cad6
commit d23bb01f90
3 changed files with 221 additions and 2 deletions

43
tool/output/container.cpp Normal file
View File

@@ -0,0 +1,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;
}