Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

void ShowInventory ( ) { vector vehicles; for ( int i = 0 ; i < vehicles.size ( ) ; i + + ) {

void ShowInventory(){
vector vehicles;
for (int i =0; i < vehicles.size(); i++){
vehicles.at(i).Display();
}
}
float GetInventoryValue(){
float sum =0;
vector vehicles;
for (int i =0; i < vehicles.size(); i++){
sum += vehicles.at(i).GetPrice();
}
return sum;
Showroom.cpp: In function void ShowInventory():
Showroom.cpp:36:23: warning: comparison of integer expressions of different signedness: int and std::vector::size_type{aka long unsigned int}[-Wsign-compare]
36| for (int i =0; i < vehicles.size(); i++){
| ~~^~~~~~~~~~~~~~~~~
Showroom.cpp: In function float GetInventoryValue():
Showroom.cpp:43:23: warning: comparison of integer expressions of different signedness: int and std::vector::size_type{aka long unsigned int}[-Wsign-compare]
43| for (int i =0; i < vehicles.size(); i++){
| ~~^~~~~~~~~~~~~~~~~

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

=+1. How similar is the source to the audience?

Answered: 1 week ago

Question

Explain exothermic and endothermic reactions with examples

Answered: 1 week ago

Question

Write a short note on rancidity and corrosiveness.

Answered: 1 week ago