mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-04-03 02:30:41 +08:00
support bazel complie this project and format code.
This commit is contained in:
41
learn_class/modern_cpp_30/reference/shape.h
Normal file
41
learn_class/modern_cpp_30/reference/shape.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class shape {
|
||||
public:
|
||||
shape() { cout << "shape" << endl; }
|
||||
|
||||
~shape() {
|
||||
cout << "~shape" << endl;
|
||||
}
|
||||
};
|
||||
|
||||
class circle : public shape {
|
||||
public:
|
||||
circle() { cout << "circle" << endl; }
|
||||
|
||||
|
||||
~circle() {
|
||||
cout << "~circle" << endl;
|
||||
}
|
||||
};
|
||||
|
||||
class triangle : public shape {
|
||||
public:
|
||||
triangle() { cout << "triangle" << endl; }
|
||||
|
||||
|
||||
~triangle() {
|
||||
cout << "~triangle" << endl;
|
||||
}
|
||||
};
|
||||
|
||||
class rectangle : public shape {
|
||||
public:
|
||||
rectangle() { cout << "rectangle" << endl; }
|
||||
|
||||
~rectangle() {
|
||||
cout << "~rectangle" << endl;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user