Question: *** C++ *** it is requested to modify the structure program movies_t to add the following: 1. Convert the year to a string, taking into

*** C++ *** it is requested to modify the structure program movies_t to add the following:

1. Convert the year to a string, taking into account that this information can be captured as 2021Q1. Add an attribute to the structure that indicates that the record has been deleted (true active, false inactive). 2. Add the function to "delete" a record, what this will do is set the identifier (point 1) to false. 3. Add the function to modify a record, its year and title. 4. Improve the captureInfo function so that it does not have the "for" and receives as a parameter the element of the structure to read, the FOR must be in the main function main(). Remove the string mystr that is not used. 5. Fix captureInfo issue when movie title has more than one word separated by a space, example: use getline(cin, films[n].titile).

#include #include #include using namespace std;

struct movies_t { string title; int year; }films[3];

void captureInfo(){ string mystr; int n; for(n=0;n<3;n++){ cout<<"titulo: "; cin>>films[n].title; cout<<"Ao: "; cin >> films[n].year; } } void printmovie(movies_t movie){ cout << movie.title; cout << " (" << movie.year << ") "; } int main(int argc, char *argv[]) { int j; captureInfo(); cout<<"************Lista de peliculas***************"<

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!