Question: C++ Write a function that will take a pointer to a vector of double pointers and a double value, a total of 2 parameters. The
C++
Write a function that will take a pointer to a vector of double pointers and a double value, a total of 2 parameters. The function must return the index of the vector as an int whose element points to a value more than the second parameter. If no elements point to a value greater than the second parameter or the first parameter is nullptr, return any negative number. Name the function findMore. See the template for clues.
CODE
#include
using namespace std;
void populateD(vector
//Change Nothing above this line
//TODO: Write your findMore function here
int main() { /*** *** Uncomment this section if you wish to test *** //Declare a vector of double pointers //add double pointers to the vector OR call populateD to populate the vector double lookFor=1.2; int index=**the return from the findMore function properly passing the vector and lookFor if(index < 0) //value more than lookFor was not found else //value at index was the first value more than lookFor */ return 0; }
void populateD(vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
