Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // A.h
- class A
- {
- int a,b;
- A();
- };
- // A.cpp
- A::A(int a, int b)
- {
- this->a = a;
- this->b = b;
- }
- // B.h
- class B : public A
- {
- int c;
- B(int a, int b, int c);
- };
- // B.cpp
- B::B(int a, int b, int c) : A(a,b)
- {
- this->c = c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement