diff --git a/Algorithm/DP-DynamicProgramming/P1025 [NOIP 2001 提高组] 数的划分.cpp b/Algorithm/DP-DynamicProgramming/P1025 [NOIP 2001 提高组] 数的划分.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Object-Oriented-Programming/嵌套类.cpp b/Object-Oriented-Programming/嵌套类.cpp new file mode 100644 index 0000000..a4b5158 --- /dev/null +++ b/Object-Oriented-Programming/嵌套类.cpp @@ -0,0 +1,38 @@ +#include +using namespace std; +class Engine{ +public: + int layer1; + class WaterTank{ + public: + int layer3; + class Water{ + public: + int layer5; + }; + }; + private: + int layer8; + class Tank{ + public: + int layer9; + }; + }; +private: + int layer2; + class EngineRope{ + public: + int layer6; + class Rope{ + public: + int layer7; + }; + }; + +}; + +int main(){ + Engine A; + cout << A.layer1 << A.WaterTank.layer3 << A.WaterTank.Water.layer5 + return 0; +}