I am writing a program that uses structure named movieData to store the following information about a movie:
Title
Director
Year Released
Running Time (in minutes)
The program should create two movieData variables, store values in their members, and pass each one, in turn, to a function that displays the information about the movie in a clearly formatted manner.
Here is what I have so far. I am not even sure this is correct. Can someone please check this part for me.
include <iostream>
#include <stdlib.h>
using namespace std;
struct Moviedata
{
string movieTitle;
string movieDirector;
int yearReleased;
int runningtime;
};
int main()
{
//Get data about a movie.
cout <<"Enter the following data about a "
<<"movie:\n";
cout << "Title: ";
cin.getline(movie.title);
cout << "Director: ";
cin >> Director.name;
cout << "Year Released: ";
cin.getline(int yearreleased, Year_size);
cout << "Running time: ";
cin.getline(movie.runningtime, Time_size);
system("PAUSE);
return 0;
}
Now the second part reads: Modify Movie Data program written for Programming challenge 1 to include two additional members that hold the movie’s production costs and first-year revenues. Modify the function that displays the movie data to display the title, director, release year, running time, and first year’s profit or loss.
This is where I am lost. I have never used C++ before and its kicking my butt. Please help!