Question: How do you apply the following with the below code? The code will need to ask the user for their selection of what they want
How do you apply the following with the below code?
The code will need to ask the user for their selection of what they want to do. Give them a choice of at least the following (Perform the above over and over until the user wants to quit): 1. Load from a file a. Read in an existing favorite activities and store it into your array of structures 2. Add a new item to the list a. Read in information from the user for something to add to the list. b. Append this information to the external data file 3. Search for a matching activity by its name to display all of the information about that activity 4. Display all 5. Quit
Here is the code:
#include
//structure struct Activity { string name,location,year,description,attire,certainDates; };
int main() { int size,i; cout<<"Enter number of activities: "; cin>>size;
//array of structure Activity act[size]; //accepting all the values of activities from user for(i=0;i
//displaying the activities with details for(i=0;i return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
