Someone please help me fix this

I tried and tried but it doesn't work. I need this kind of code. but i don't know how to continue right now....
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#include <iostream>
#include <string>
using namespace std;

class Vehicle
{
	protected:
		string Manufacturer;
		string Type;
		int Seatnumber;
	public:
		Vehicle()
		{   
			Manufacturer="";
			Type="";
			Seatnumber=1;
		};
		Vehicle(string manufacturer,string type,int seatnumber)
		{   Manufacturer=manufacturer;
			Type=type;
			Seatnumber=seatnumber;
		};
		void setmanufacturer(string manufacturer)
		{   Manufacturer=manufacturer;
		};
		void settype(string type)
		{	Type=type;
		};
		void setseatnumber(int seatnumber)
		{	Seatnumber=seatnumber;
		};
		string getmanufacturer()
		{   return Manufacturer;
		}
		string gettype()
		{	return Type;	
		};
		int getseatnumber()
		{	return 	Seatnumber;
		};
};
class Car: public Vehicle
{
	protected:
		string Carplatenumber;
		string Model;
	public:
		Car():Vehicle()
		{
			Carplatenumber="";
			Model="";
		};
		Car(string carplatenumber, string model)
		{	Carplatenumber=carplatenumber;
			Model=model;
		};
		void setcarplatenumber(string carplatenumber)
		{	Carplatenumber=carplatenumber;
		};
		void setmodel(string model)
		{	 Model=model;
		};
		string getcarplatenumber()
		{	return Carplatenumber;	
		};
		string getmodel()
		{	return Model;	
		};
		void display();
};
inline void Car::display(){

	cout<<Manufacturer;
	cout<<Type;
	cout<<Seatnumber;
	cout<<Carplatenumber;
	cout<<Model;
	
};
int main ()
{ 
	char choice;
	int size=0,seats;
	Car car[size];
	string manufacturer,type,carplatenumber,model;
	cout<<"Please choice a selection: ";
	cin>>choice;
	switch(choice){
		case 'A':
			cout<<"How many cars information do you want to store in it : ";
			cin>>size;
			cout<<"\n";
			for(int i=0;i<size;i++){
				cout << "Enter car "<<i+1<<" Manufacturer : ";
				cin >> manufacturer;
				car[size].setmanufacturer(manufacturer);
				cout << "Enter car "<<i+1<<" Type : ";
				cin >> type;
				car[size].settype(type);
				cout << "Enter car "<<i+1<<" Seatsnumber of the car : ";
				cin >> seats;
				car[size].setseatnumber(seats);
				cout << "Enter car "<<i+1<<" Model : ";
				cin >> model;
				car[size].setModel(model);
			}
			break;
		case'B':
			cout << "Hi,there please update your carplatenumber after u have gone through your new car!";
			cin >> carplatenumber;
			car[size].setCarplatenumber(carplatenumber)
 			break;
 		case'C':
 			int c=0;
 			cout<<"Hi,which car of information would like to print our!";
 			cin>>c;
 			cout<<car[c].display();
 			break;
 		case'D':
 			cout<<"Here you go!";
 			cout<<"========================";
 			for(int i=0;i<=size;i++){
 				car[i].display();
 				cout<<"=======================";
			 }
			 break;
		default:cout<<"Invalid input";
	}
C++ is a case-sensitive language. setmodel is not the same as setModel. Make sure you use the same capitalisation everywhere.
Last edited on
sure i willl try rewrite
but after i change it still have some problem on those array and the switch case
Would you like to give us a hint as to what kind of problem you are having? Does it fail to compile? If so, what error message are you getting?
Does it fail when you run it? If so, what do you expect it to do, and what does it actually do?
closed account (48T7M4Gy)
http://www.cplusplus.com/forum/beginner/192211/ etc etc

many many multiple posts.
closed account (48T7M4Gy)
http://www.cplusplus.com/forum/beginner/192211/
http://www.cplusplus.com/forum/beginner/192200/
http://www.cplusplus.com/forum/beginner/192169/
http://www.cplusplus.com/forum/beginner/192206/
http://www.cplusplus.com/forum/beginner/192198/
Topic archived. No new replies allowed.