Question: How to store a sentence of strings into a vector container with push_back until I enter and type quit? string str: vector v: if (str

 How to store a sentence of strings into a vector container

How to store a sentence of strings into a vector container with push_back until I enter and type "quit"? string str: vector v: if (str != "quit") {//use push_back to store str to vector} BUILD 3 LOOPS TO DISPLAY THE USER DEFINED STRING SENTENCE WITH THE CONDITIONS: to print out the strings using a for loop with begin and end & differencing iterator pointer. In another loop using the C++11 auto keyword to simplify the declaration of the iterator To print the contents of the vector in reverse order using rbegin and rend

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!