i have done with this structure
but i have some syntax error idk how fix it
the errors start from line 22
idk what kind of error it is becuase the requirement is not a complete program ..
//write the defnetion of a structer type named movie to represnt a movie in video shop .
//the structers has the following members :
//Title (string) , Numberofcopies(int) , movietype(string).
//1- write one statment to declare FamilyMovie as a stuctere of type movie .
//2- write one statment to declare an array ListMovies of type movie of size 10.
//3- write statments to read data of 10 movies and store them in ListMovie .
//4- write staments to print data for all "comedy" movies in ListMovie .
//5- write statments to search and print titles of all movies with 0 numberofcopies in ListMovie.
struct movie
{
string title;
int numberofcopies;
string movietype;
};
movie FamilyMovie;
movie ListMovies[10];
for(int i=0 ; i<10 ; i++)
cin >> ListMovies[i].title >>" ">> ListMovies[i].numberofcopies >>" ">> ListMovies[i].movietype;
for(int i=0 ; i<ListMovies[i].movietype ; i++)
cout << ListMovies[i].title="comedy";
cout << ListMovies[i].numberofcopies="comedy";
cout << ListMovies[i].movietype="comedy";
for(i=0 ; i<numberofcopies ; i++)
if(ListMovies[i] == title)
cout << ListMovies[i].title;