+ 1
Plz solve the bug
using namespace std; #include<iostream> class Vehicle{ public: int mileage=30; int cost=500; void put_vehicle_details(){ cout<<"I am a vehicle"; cout<<"\nMileage of vehicle is : "<<mileage; cout<<"\ncost of vehicle is : "<<cost; } }; void Car : public Vehicle { public: string color="black"; int tyres = 4; void show_car_details(){ cout<<"I am car"; cout<<"\nColor of car is : "<<color; cout<<"\nNo of tyres in car are : "<<tyres; } }; int main(){ Car c1; c1.put_vehicle_details(); return 0; } https://code.sololearn.com/c1kG9mxWWPxG/?ref=app
2 Answers
+ 4
23. class Car : public Vehicle { // debug
+ 1
Thanks