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