Question: #include class CarModel { private: long m _ id; public: CarModel ( long id ) : m _ id ( id ) { } long
#include
class CarModel
private:
long mid;
public:
CarModellong id
: midid
long getID return mid;
;
class EngineType
private:
long mid;
public:
EngineTypelong id
: midid
long getID return mid;
;
class StarterBattery: public CarModel, public EngineType
public:
StarterBatterylong carmodelId, long enginetypeId
: CarModelcarmodelId EngineTypeenginetypeId
;
int main
StarterBattery cX;
std::cout cXgetID;
return ;
Whats the error of the code and the soultion to fix it
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
