Question: C++ Download and debug Write comments where there are errors. // Function prototype void displayMovie(MovieData); int main() { // Create two MovieData variables. MovieData movie1,

C++ Download and debug Write comments where there are errors.

// Function prototype void displayMovie(MovieData); int main() { // Create two MovieData variables. MovieData movie1, movie2; // Assign values to movie1's members. movie1 *title = "War of the Worlds"; movie1 *director = "Byron Haskin"; movie1 *year = 1953; movie1 *length = 88; // Assign values to movie2's members. movie2 * title = "War of the Worlds"; movie2 * director = "Stephen Spielberg"; movie2* year = 2005; movie2 *length = 118; // Display movie1's data. displayMovie(movie1); cout << endl; // Display movie2's data. displayMovie(movie2); return 0; } //***************************************************** // The displayMovie function displays the data in the * // member variables of the MovieData structure passed * // as an argument. * // **************************************************** void displayMovie(MovieData m) { cout << " Title : " << m*title; cout << " Director : " << m*director; cout << " Released : " << m*year; cout << " Running Time: " << m*length << " minutes" << endl; }

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!