Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <unordered_map>
- #include <string>
- #include <vector>
- #include <cstring>
- #include <memory>
- #include <algorithm>
- #include <map>
- using namespace std;
- class A {
- public:
- A() {
- cout << "A()" << endl;
- }
- ~A() {
- cout << "~A()" << endl;
- }
- };
- class B: public A {
- public:
- B(){
- cout << "B()" << endl;
- };
- ~B() {
- cout << "~B()" << endl;
- }
- };
- class C: public B {
- public:
- C() {
- cout << "C()" << endl;
- }
- ~C() {
- cout << "~C()" << endl;
- }
- };
- int main() {
- C c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement