In this exercise I am using Visual Studio Community 2017 and the header file "std_lib_facilities.h" which can be found here:
http://www.stroustrup.com/Programming/PPP2code/std_lib_facilities.h
http://www.stroustrup.com/Programming/PPP2code/std_lib_facilities.h
Chapter 11 // Exercise 10
Write a function vector<string> split(const string& s) that returns a vector
of whitespace-separated substrings from the argument s.
On this one I'm assuming he just meant "read in the entire thing push back single words and spaces". So that's what I did. It's a vector that goes "word", " ", "word", " ", etc.
No comments:
Post a Comment