Question: (C++) 1. Write a function which inputs one large string (use reference to a const) and returns a vector of strings. Each of the entries
(C++)
1. Write a function which inputs one large string (use reference to a const) and returns a vector of strings. Each of the entries of the vector should be a word from the original string. There should be no spaces in the vector, but if a word is immediately followed by punctuation, you should keep that punctuation at the end of the word. So for example, if input string was Isnt the weather lovely today!? Unrelatedly, would you like some coffee? The function words should return a vector of strings of length 11. The 11 strings should be Isnt the weather lovely today!? Unrelatedly, would you like some and coffee?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
