Question: #include #include using namespace std; class City { public: void ReadSizeAndName(); void Print() const; private: int size; string name; }; void City::ReadSizeAndName() { cin >>

#include
class City { public: void ReadSizeAndName(); void Print() const; private: int size; string name; };
void City::ReadSizeAndName() { cin >> size; cin >> name; }
void City::Print() const { cout
int main() { unsigned int i; vector
/* Your code goes here */ just follow the default template do not change other code. for (i = 0; i Jump to level 1 Use cin to read integer entryNumber from input until the next entryNumber read is equal to 1. If entryNumber is not equal to 1, use currCity's ReadSizeAndName() to read the city's size and name from input and append currCity to vector cityList. Ex: If the input is: then the output is: City size: 4152, Name: Asaph City size: 3504, Name: Gillette City size: 4396, Name: Hum City size: 4888, Name: Yonder City size: 1478, Name: Glendo 1 3 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
