Question: Part a) Define a struct for a Movie which has the following fields: MovieName (string), ActorNames (vector of strings), views (int), rating (double). Part b)
Part a) Define a struct for a Movie which has the following fields: MovieName (string), ActorNames (vector of strings), views (int), rating (double).
Part b) Write a C++ function that takes a vector of Movies and a string ActorName and returns the average rate of the movies that ActorName played in. For example, if the ActorName played in 3 movies with the following rates: 3, 1, and 4, your function should return (3+1+4)/3 = 2.67
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
