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