Question: C++ void appendVector(vector & v, const vector & w); Provide an implementation of the appendVector function whose declaration is shown above. Both arguments of the
C++
void appendVector(vector & v, const vector & w);
Provide an implementation of the appendVector function whose declaration is shown above. Both arguments of the function are vectors of int. The function should modify vector v by appending to it all the elements of w. For example, if v = (4, 2, 5) and w = (11, 3), then v will become (4, 2, 5, 11, 3) as a result of calling the function. Hint: the vector class has a function called push_back that appends values passed into it. Write test code that thoroughly tests the function. The test code should use assertions.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
