Make a movie_record struct, and then make an array of movie_record structs.
(How?????????????????)
After I setup your array of movie records, then write a function, set_movies(), that allows you to set the information for each movie, i.e. the title, rating, description, copies, and genre. You only have to do this for 5 movies, i.e. #define NUM_MOVIES 5.
Now, write another function, which_movies_to_view(), that asks the user which
movies he/she wants to view. You can ask the user if he/she want to see all movies or by genre, and write a function, get_movies(), to display the titles of movies depending on the user’s choice. Hint: This might be a good time to use function overloading
Lastly, let the user choose to see more information about a movie or rent a movie. Write a function, get_movie_info(), that displays all the information about a specific movie for a user, and write another function, rent_movie(), that rents the movie to the user by decrementing the number of copies for a specific movie.
I have this so far:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#include<iostream>
#include<string>
#include<cstring>
#define NUM_MOVIES 5
using namespace std;
struct movie_record
{
string title;
int copies;
string rating;
string description;
string genre;
};
void set_movies();
void which_movies_to_view();
void get_movies();
void get_movie_info();
void rent_movie();
int main()
{
}
|
Can someone help me? not fully understanding how to get full sentences for arrays and use the struct. Please help.