From 837d003097493bd2adea07046d71e6eaed1f4a6f Mon Sep 17 00:00:00 2001 From: estomm Date: Tue, 14 Sep 2021 17:12:52 +0800 Subject: [PATCH] 123 --- code_segment/shili.cpp | 23 +++++++++++++++++++++++ 工作日志/2021年9月12日.md | 1 + 2 files changed, 24 insertions(+) create mode 100644 工作日志/2021年9月12日.md diff --git a/code_segment/shili.cpp b/code_segment/shili.cpp index bfe37026..d00c5919 100644 --- a/code_segment/shili.cpp +++ b/code_segment/shili.cpp @@ -1,5 +1,28 @@ #include using namespace std; + +class Wood{ +private: + int length; + int width; +public: + int get_length(){ + return this->length; + } + int get_width(){ + return this->width; + } +}; + +class desk:public wood{ +private: + int height; +public: + int get_height(){ + return this->height; + } +}; + int add(int a,int b){ int c = a+b; return c; diff --git a/工作日志/2021年9月12日.md b/工作日志/2021年9月12日.md new file mode 100644 index 00000000..4ddef2c7 --- /dev/null +++ b/工作日志/2021年9月12日.md @@ -0,0 +1 @@ +1. 关于封装的讨论。 \ No newline at end of file