SHARE
TWEET

Untitled

a guest Jul 17th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top