新增依赖
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
|||||||
[submodule "Convention/[nlohmann]"]
|
[submodule "Convention/[nlohmann]"]
|
||||||
path = Convention/[nlohmann]
|
path = Convention/[nlohmann]
|
||||||
url = https://github.com/nlohmann/json.git
|
url = https://github.com/nlohmann/json.git
|
||||||
|
[submodule "Convention/[Static]"]
|
||||||
|
path = Convention/[Static]
|
||||||
|
url = https://github.com/NINEMINEsigma/ModernCPP.git
|
||||||
|
1
Convention/[Static]
Submodule
1
Convention/[Static]
Submodule
Submodule Convention/[Static] added at 004f2f3367
33
README.md
Normal file
33
README.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# 前置要求
|
||||||
|
|
||||||
|
- **编译器**: 支持C++17的编译器 (GCC 7+, Clang 5+, MSVC 2017+)
|
||||||
|
- **CMake**: 3.14或更高版本
|
||||||
|
- **Git**: 用于克隆子模块
|
||||||
|
|
||||||
|
# 克隆项目
|
||||||
|
|
||||||
|
由于项目包含Git子模块,请使用以下命令进行完整克隆:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 方法1: 递归克隆(推荐)
|
||||||
|
git clone --recursive https://github.com/your-username/Convention-CPP.git
|
||||||
|
cd Convention-CPP
|
||||||
|
|
||||||
|
# 方法2: 先克隆主项目,再初始化子模块
|
||||||
|
git clone https://github.com/your-username/Convention-CPP.git
|
||||||
|
cd Convention-CPP
|
||||||
|
git submodule update --init --recursive
|
||||||
|
```
|
||||||
|
|
||||||
|
# 更新子模块
|
||||||
|
|
||||||
|
如果子模块有更新,使用以下命令:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 更新所有子模块到最新版本
|
||||||
|
git submodule update --remote
|
||||||
|
|
||||||
|
# 或者更新特定子模块
|
||||||
|
git submodule update --remote Convention/[nlohmann]
|
||||||
|
git submodule update --remote Convention/[Static]
|
||||||
|
```
|
@@ -1,10 +1,28 @@
|
|||||||
#include<Config.hpp>
|
#include<Config.hpp>
|
||||||
#include<GlobalConfig.hpp>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace Convention;
|
using namespace Convention;
|
||||||
|
|
||||||
|
class A
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void a() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
class B
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void b() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
class C :public A, protected B
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void c() {}
|
||||||
|
};
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
cout << ProjectConfig().LoadProperties().FindItem<std::string>("test", "test") << endl;
|
C c;
|
||||||
|
((A)c).a();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user