int Add(int a, int b) // 3
{
return a + b;
}
float Add(float a, float b) // 4
{
return a + b;
}
int main()
{
Add(10, 10); // 1
Add(4.1f, 2.2f); // 2
return 0;
}
template<typename T>
T Add(T a, T b)
{
return a + b;
}
int main()
{
int value = Add<int>(10, 10); // 1
value = Add<float>(1.2f, 3.5f); // 2
return 0;
}
#include<vector>
using std::vector;
int main()
{
vector<int> vecInt; // 1
vector<float> vecFloat; // 2
}
// 메인 함수 전처리기 등등 생략.
int value = Add(10, 10); // 1
value = Add(1.2f, 3.5f); // 2
using namespace MY_SPACE; // 10
namespace MY_SPACE
{
void TestFunc() // 5
{
}
int g_Global = 0; // 6
}
void TestFunc() // 7
{
}
int g_Global; // 8
int g_Globa2 = 0;
namespace MY_SPACE // 9
{
int g_Globa2 = 0;
}
int main()
{
MY_SPACE::TestFunc(); // 1
TestFunc(); // 2
g_Global = 100; // 3
MY_SPACE::g_Global = 10;// 4
}
#include <iostream>
#incldue <vector>
using namespace std; // 1
int main()
{
std::vector<int> vecInt;
std::vector<float> vecFloat;
}
using std::vector;
int data = 10;
int main()
{
int data = 0;
data = 10; // 1
::data = 10; // 2
}
void Realloc() // 4
{
}
void CArr::push_back(int _Data)
{
if (m_MaxCount <= m_CurCount)
{
Realloc(); // 1
::Realloc(); // 2
}
}
void CArr::Realloc() // 3
{
}
#include <iostream>
#include <vector>
#include <string>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
#include <queue>
#include <algorithm>
//using namespace std;
using std::vector;
std::string;
std::wstring;
std::list<int>;
namespace MY_SPACE
{
void TestFunc()
{
}
int g_Global = 0;
}
int g_Global = 0;
int g_Global2 = 0;
void TestFunc()
{
}
namespace MY_SPACE
{
int g_Global2 = 0;
}
//using namespace MY_SPACE;
#include "CArr.h"
template<typename T>
T Add(T a, T b)
{
return a + b;
}
int data = 10;
int main()
{
MY_SPACE::TestFunc();
TestFunc();
MY_SPACE::g_Global = 100;
g_Global = 100;
int data = 0;
data = 10;
::data = 10;
int value = Add(10, 10);
value = Add(1.2f, 3.5f);
Add<float>(1.2f, 3.5f);
Add<float>(1.2f, 3.5f);
std::vector<int> vecInt;
std::vector<float> vecFloat;
return 0;
}
1차 23.12.26
2차 23.12.27
3차 23.12.28
4차 23.12.29
5차 24.01.02
6차 24.01.03