Question: Using the Star structure defined in file p1.cpp, write the function named magnitudeBetween(). The function takes three input parameters: a vector of Stars as well

Using the Star structure defined in file p1.cpp, write the function named magnitudeBetween(). The function takes three input parameters: a vector of Stars as well as a lower and upper bounds. The function returns a vector of size_t containing indexes of the stars whose magnitude falls between the two bounds (exclusive). Please explain your steps if possible . Thanks.

Using the Star structure defined in file p1.cpp, write the function named

p1.cpp:

*/ #include #include #include #include #include // already included for you using namespace std;

// The structure (don't change these) struct Star { double x, y; double magnitude; int draperNumber; string names; };

vector indexes; indexes magnitudeBetween (vStars, 1.5, 3.4)

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!