Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*** 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions