Question: c++ In this lab exercise you will declare a vector of strings named userStrings. vector userStrings; 1. Allow the user to populate the vector at

c++

In this lab exercise you will declare a vector of strings named userStrings.

vector userStrings;

1. Allow the user to populate the vector at run time. Do not set a size, use the push back method.

2. Implement a regular function that prints the strings to the screen using the following prototype:

void printStrings(vector arg);

3. Implement a regular function that returns a random string from the vector using the following prototype:

string randomString(vector arg);

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 Programming Questions!