Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- class Vehicle {
- public:
- Vehicle() {
- cout << "Vehicle constructor called" << endl;
- }
- };
- class Car: public Vehicle {
- public:
- Car() {
- cout << "Car constructor called" << endl;
- }
- };
- int main() {
- Car car;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement