123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
/* #include<iostream> #include<cstring> #include<stdlib.h> #define NUM_MOVIES 5 using namespace std; struct movie_record{ string title[NUM_MOVIES]; int year[NUM_MOVIES]; string rating[NUM_MOVIES]; string description[NUM_MOVIES]; string genre[NUM_MOVIES]; }; int set_movie(){ movie_record movies[NUM_MOVIES]; const char* movies[0].title="titleone" ; const char* movies[0].year="yearone"; const char* movies[0].rating="G"; const char* movies[0].description="descriptionone"; const char* movies[0].genre="Fantasy"; const char* movies[1].title="titletwo"; const char* movies[1].year="yeartwo"; const char* movies[1].rating="G"; const char* movies[1].description="descriptiontwo"; const char* movies[1].genre="Fantasy"; const char* movies[2].title="titlethree"; const char* movies[2].year="yearthree"; const char* movies[2].rating="G"; const char* movies[2].description="descriptionthree"; const char* movies[2].genre="Adventure"; etc.... } int main(){ cout<<"View all movies?(y/n) "; char view; cin>>view; movie_record movies[NUM_MOVIES]; if ( view == 'y' || view == 'Y'){ for (int i; i<NUM_MOVIES; i++){ cout<< movies[i].title<< ", "<< movies[i].year<<", "<< movies[i].rating<<", "<< movies[i].description<<", "<< movies[i].genre<<endl; } } else if (view == 'n' || view == 'N'){ } } */
const char *
const char*