Question: Write a program that reads in data from a file and places the information in a struct named MovieData. The input file has between zero

Write a program that reads in data from a file and places the information in a struct named MovieData. The input file has between zero and 100 records each with the all of following items (in order, separated as noted below)

Title

ReleaseYear

RunningTime

Rating

Title might have spaces in them. RunningTime is in minutes. Rating is something similar to RottenTomatoes.com, so listed in a percent. You will have a menu that continues until your press exit, and returns an error and goes back to the menu if not one of the choices. You can assume the user will only enter integers for the menu:

Read in Movies

Add Movies

List Movies

Exit

Like in the example declare an array in main(). Declare a MAXSIZE in main, then pass the parameters. Remember that you do not pass an array by reference, but if you are going to change the size variable when you Add, that will need to be passed by reference (& before the variable name)

When you add movies, you should add them to the next point in the array and increment the size, but should verify that you are not trying to add past the MAXSIZE of the array.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!