Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in c++ Write, compile and test a program that defines the enumeration datatype Continent which represents continents across the globe. These continents are Asia, Africa,
in c++
Write, compile and test a program that defines the enumeration datatype Continent which represents continents across the globe. These continents are Asia, Africa, North America South America. Antarctica, Europe and Australia. In addition, the program defines the structure City that stores information about a city. In particular, it stores the name of the city its population and the continent in which it is located Towards that end, the developed program should implement the following items: 1. A suitable declaration for the Continent dataTyre 2. A suitable declaration for the City structure/datatype. 3. The function setCity Q that takes a reference parameter to a City and some values for name, population and continent to initialize such a city. setCity. ) returns void. 4. The function printCity that takes a pointer to City and an integer num and prints out the city details as shown below.printSite() must return void. The format of its output should look as follows: City: 1 The city name: Sharjah The city population: 500000 The city continent: Asia 5. A driver program that reads the data from the file cities.txt and store them in a dynamically created table of pointers to the corresponding CitiesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started