Write a C++ program named Movies that uses a struct to store attributes of Movies. These will be the title, the year it was released and the star of the movie. This is a multi-file program. Declare the struct in the .h file. Add four functions: WriteHeader, Goodbye, PrintMovie and AskForFaveMovie, and pass them a struct object using call by reference. In main, create two struct objects, mine and yours. Initialize the stuct with values for mine, that is, your favorite movie. Ask the user for their favorite movie and the data by passing the yours Movies object to the function AskForFaveMovie. Call PrintMovie twice, once to display the favorite of mine and once to display the favorite of yours.
Write a C++
This is a multi-file program. Declare the struct in the .h file. Add four functions: WriteHeader, Goodbye, PrintMovie and AskForFaveMovie, and pass them a struct object using call by reference.
In main, create two struct objects, mine and yours. Initialize the stuct with values for mine, that is, your favorite movie. Ask the user for their favorite movie and the data by passing the yours Movies object to the function AskForFaveMovie.
Call PrintMovie twice, once to display the favorite of mine and once to display the favorite of yours.
Unlock instant AI solutions
Tap the button
to generate a solution