Question: FIND_MIN.CPP #include #include #include libmin.h using namespace std; int main() { int r, min, len; vector array; cout > len; cout > r; array.push_back(r); }

 FIND_MIN.CPP #include #include #include "libmin.h" using namespace std; int main() {

FIND_MIN.CPP

#include #include #include "libmin.h" using namespace std;

int main() { int r, min, len; vector array; cout > len; cout > r; array.push_back(r); } find_min_ref(array, min); cout

return 0; }

Given find min.cpp, write the corresponding lib files. find min.cpp prints the minimum integer in a vector by calling two separate functions. The functions do achieve the same result by two different means - one by pointer, one by reference. The functions' prototypes are shown below and should be placed in a library file named libmin.h. The respective definitions should be written in libmin.cpp void find min ref (vector array, int &min); void find min-ptr(vector array, int *min); Note: Compile your code with the command g++-std-c++11 findmin. cpp libmin.cpp

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!