/*
Patrick Plociennik
Week 6 assignment
02/23/10
Program: Movie Data
*/
#include <iostream>
#include <string>
using namespace std;
struct MovieData
{
int runningTime;
int Year;
string Director;
string Title;
MovieData()
{ Title = "";
Director = "";
Year = 0;
runningTime = 0;
}
};
int movieYearRunningtime(MovieData);
string movieTitleDirector(MovieData);
void movieOutput(MovieData);
int main(int argc, char **argv)
{
movieYearRunningtime();
string movieTitleDirector();
void movieOutput();
system("PAUSE");
return 0;
}
int movieYearRunningtime(MovieData)
{
MovieData movie1, movie2;
int runningtime;
int year;
cout << "Hello\n";
cout << "Please have two movies ready to be input\n";
cout << "What is the year your 1st movie was realeased?\n";
cin >> year;
return movie1.Year = year;
cout << "What is the running time of your 1st movie?\n";
cin >> runningtime;
movie1.runningTime = runningtime;
}
string movieTitleDirector(MovieData)
{
MovieData movie1, movie2;
string title;
string director;
cout << "\nWhat is the Title of your 1st movie?\nPlease use underscores instead of spaces (hint: _)\n";
cin.get(title);
movie1.Title = title;
cout << "What is the director of you 1st movie?\nPlease use underscores instead of spaces (hint: _)\n";
cin.get(director);
movie1.Director = director;
}
void movieOutput(MovieData)
{
MovieData movie1, movie2;
cout << "Your 1st movies title is " << movie1.Title << endl;
cout << "Your 1st movies director is " << movie1.Director << endl;
cout << "Your 1st movies realease year is " << movie1.Year << endl;
cout << "Your 1st movies running time is " << movie1.runningTime << endl;
}