#pragma once
#include <iostream>
using namespace std;
namespace LOL
{
void goAtk();
}
#include "game1.h"
void LOL::goAtk()
{
cout << "LOL的攻击实现" << endl;
}
#pragma once
#include <iostream>
using namespace std;
namespace KingGlory
{
void goAtk();
}
#include "game2.h"
void KingGlory::goAtk()
{
cout << "王者农药的攻击实现" << endl;
}
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include "game1.h"
#include "game2.h"
using namespace std;
namespace A
{
void func() {};
int m_A;
struct Person
{
};
class Animal {};
namespace B
{
int m_A=100;
}
}
void test02()
{
cout << "作用域B下的m_A为" << A::B::m_A << endl;
}
namespace A
{
int m_B = 200;
}
void test03()
{
cout << "命名空间A下的m_A为" << A::m_A << " m_B为" << A::m_B << endl;
}
namespace
{
int m_C;
int m_D;
}
namespace veryLongName
{
int m_A;
}
void test04()
{
namespace veryShortName = veryLongName;
cout << veryLongName::m_A << endl;
cout << veryShortName::m_A << endl;
}
int main()
{
test04();
system("pause");
return EXIT_SUCCESS;
}