Question: void AddVehicle ( Vehicle v ) { int numberOfVehicles = vehicles.size ( ) ; if ( numberOfVehicles = = capacity ) { cout < <

void AddVehicle(Vehicle v){
int numberOfVehicles = vehicles.size();
if (numberOfVehicles == capacity){
cout << "Showroom is full! Cannot add "<< v.GetYearMakeModel()<< endl;
cout << "Vehicles in Full Showroom" << endl;
}
else {
vehicles.push_back(v); Showroom.cpp: In function void AddVehicle(Vehicle):
Showroom.cpp:24:28: error: vehicles was not declared in this scope; did you mean Vehicle?
24| int numberOfVehicles = vehicles.size();
|^~~~~~~~
|
}
}
Showroom.cpp: In function void AddVehicle(Vehicle):
Showroom.cpp:24:28: error: vehicles was not declared in this scope; did you mean Vehicle?
24| int numberOfVehicles = vehicles.size();
|^~~~~~~~
|

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!