Skip to content

Commit e34c220

Browse files
committed
test06.cpp
1 parent 3d8aa04 commit e34c220

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

section2/test06.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright (c) 2020 by Chrono
2+
//
3+
// g++ test06.cpp -std=c++11 -o a.out;./a.out
4+
// g++ test06.cpp -std=c++14 -o a.out;./a.out
5+
// g++ test06.cpp -std=c++14 -I../common -o a.out;./a.out
6+
7+
#include <iostream>
8+
#include <string>
9+
#include <map>
10+
11+
void case1()
12+
{
13+
14+
int i = 0;
15+
double x = 1.0;
16+
17+
std::string str = "hello";
18+
std::map<int, std::string> m = {{1,"a"}, {2,"b"}};
19+
20+
std::map<int, std::string>::const_iterator iter = m.begin();
21+
22+
//using namespace std;
23+
//cout << i << x;
24+
}
25+
26+
27+
int main()
28+
{
29+
using namespace std;
30+
31+
cout << "auto/decltype demo" << endl;
32+
}

0 commit comments

Comments
 (0)