1. /*
  2. Patrick Plociennik
  3. Week 6 assignment
  4. 02/23/10
  5. Program: Movie Data
  6. */
  7.  
  8. #include <iostream>
  9. #include <string>
  10. using namespace std;
  11.  
  12.  
  13.  
  14. struct MovieData
  15. {
  16. int runningTime;
  17. int Year;
  18. string Director;
  19. string Title;
  20.  
  21. MovieData()
  22. { Title = "";
  23. Director = "";
  24. Year = 0;
  25. runningTime = 0;
  26. }
  27. };
  28.  
  29. int movieYearRunningtime(MovieData);
  30. string movieTitleDirector(MovieData);
  31. void movieOutput(MovieData);
  32.  
  33. int main(int argc, char **argv)
  34. {
  35.  
  36.  
  37. movieYearRunningtime();
  38. string movieTitleDirector();
  39. void movieOutput();
  40.  
  41. system("PAUSE");
  42. return 0;
  43. }
  44.  
  45. int movieYearRunningtime(MovieData)
  46.  
  47. {
  48.  
  49. MovieData movie1, movie2;
  50. int runningtime;
  51. int year;
  52.  
  53.  
  54. cout << "Hello\n";
  55. cout << "Please have two movies ready to be input\n";
  56.  
  57.  
  58.  
  59. cout << "What is the year your 1st movie was realeased?\n";
  60. cin >> year;
  61. return movie1.Year = year;
  62.  
  63. cout << "What is the running time of your 1st movie?\n";
  64. cin >> runningtime;
  65. movie1.runningTime = runningtime;
  66.  
  67.  
  68.  
  69. }
  70.  
  71. string movieTitleDirector(MovieData)
  72. {
  73.  
  74. MovieData movie1, movie2;
  75. string title;
  76. string director;
  77.  
  78. cout << "\nWhat is the Title of your 1st movie?\nPlease use underscores instead of spaces (hint: _)\n";
  79. cin.get(title);
  80. movie1.Title = title;
  81.  
  82. cout << "What is the director of you 1st movie?\nPlease use underscores instead of spaces (hint: _)\n";
  83. cin.get(director);
  84. movie1.Director = director;
  85.  
  86.  
  87.  
  88. }
  89.  
  90. void movieOutput(MovieData)
  91. {
  92. MovieData movie1, movie2;
  93.  
  94. cout << "Your 1st movies title is " << movie1.Title << endl;
  95. cout << "Your 1st movies director is " << movie1.Director << endl;
  96. cout << "Your 1st movies realease year is " << movie1.Year << endl;
  97. cout << "Your 1st movies running time is " << movie1.runningTime << endl;
  98.  
  99. }