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
Step: 1
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-text-image.webp)
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Step: 3
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started