| 2 | using namespace std; |
| 3 | |
| 4 | class Base |
| 5 | { |
| 6 | protected: |
| 7 | int x; |
| 8 | public: |
| 9 | virtual void fun() = 0; // 纯虚函数 |
| 10 | explicit Base(int i) { x = i; } |
| 11 | virtual ~Base() { |
| 12 | cout << "Destructor: Base." << endl; |
| 13 | } |
| 14 | }; |
| 15 | |
| 16 | class Derived: public Base |
| 17 | { |
nothing calls this directly
no outgoing calls
no test coverage detected