mirror of
https://github.com/Estom/notes.git
synced 2026-04-02 02:20:25 +08:00
123
This commit is contained in:
@@ -1,5 +1,28 @@
|
||||
#include<iostream>
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user