Samchon Framework for CPP  1.0.0
test_main.cpp
1 #include <iostream>
2 #include <unordered_map>
3 
4 #ifdef _WIN64
5 # ifdef _DEBUG
6 # pragma comment(lib, "x64/Debug/SamchonFramework.lib")
7 # else
8 # pragma comment(lib, "x64/Release/SamchonFramework.lib")
9 # endif
10 #else
11 # ifdef _DEBUG
12 # pragma comment(lib, "Debug/SamchonFramework.lib")
13 # else
14 # pragma comment(lib, "Release/SamchonFramework.lib")
15 # endif
16 #endif
17 
18 using namespace std;
19 
20 void main()
21 {
22  unordered_map<int, int> intMap;
23  for (int i = 1; i <= 10; i++)
24  intMap[i] = i;
25 
26  for (unordered_map<int, int>::iterator it = intMap.begin(); it != intMap.end(); it++)
27  {
28  if (it->first == 3)
29  {
30  int val = it->second;
31 
32  it = intMap.erase(it);
33  intMap.insert(it, {33, val});
34  }
35  }
36 
37  for (auto it = intMap.begin(); it != intMap.end(); it++)
38  cout << it->first << ", " << it->second << endl;
39 
40  system("pause");
41 }
Definition: RWMutex.hpp:4