Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. class Vehicle {
  4. public:
  5. Vehicle() {
  6. cout << "Vehicle constructor called" << endl;
  7. }
  8. };
  9.  
  10. class Car: public Vehicle {
  11. public:
  12. Car() {
  13. cout << "Car constructor called" << endl;
  14. }
  15. };
  16.  
  17. int main() {
  18. Car car;
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement