Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can someone tell me why i keep getting these errors when i try to compare the ID number, make, model, and color of the car

can someone tell me why i keep getting these errors when i try to compare the ID number, make, model, and color of the car object inside my list container. image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Terminal Help File Edit View Search #include #include #include using namespace std; #ifndef CARS H #define CARS H class Car public: Car(); Car(int id, string make, string model, string color); int getID(); string getMake(); string getModel(); string getColor(); void setID(int id); void setMake(string make); void setModel (string model); void setColor(string color); private: int carID; string carMake; string carModel; string_carColor; dendir Terminal Help File Edit View Search #include #include #include "cars.h" using namespace std; #ifndef CONTAINER H #define CONTAINER H class Container public: Container(); Container(int capacity); Container(const Container& that); Container& operator=(const Container& that); -Container(); int size(); int capacity(); void add(Car num); void traverse(); Car get(int index); void set(int index, Car num); void add(int index, Car num); void del(int index); Car pop(); void push_back (Car num); private: Carpa; int size; int capacity: bool"isFull(); void doubleCapacity(); Vendif int main() ifstream inFile; Container container; int id; string make; string model; string color; string line; infile.open("cars.data"); if(infile.fail()) { cerr > choice; bool carFound = false; switch(choice) case 1: cout > id; for(int i = 0; i > make; for(int i = 0; i > model: for(int i 0; i > color; for(int 1.0; i > id: for(int i = 0; i > make; cout > model: cout > color: Car acar(id, make, model, color); container.add(acar); //container.add(Cardid, make, model, color)); addlewar.close(); break; case 6: cout > make; cout > model; cout > color; Car acar(id, make, model, color); container.add(acar); 1/container.add(Car(id, make, model, color)); addNewCar.close(); break; case 6: cout > id; for(int i 0; container.size(); 1) 1f(id - Car.getID)){ container.del(1); cout

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

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

How does maturity correlate to quality?

Answered: 1 week ago

Question

4. Is crime caused by mental illness?

Answered: 1 week ago

Question

How does national culture relate to organizational culture?

Answered: 1 week ago