I'm trying to solve the exercise of chapter 20 of the book: Programming Principles And Practice Using C++2nd Edition May 2014.
Here is the image of some of them. Please read exercise 10: https://ibb.co/dj6tPk
What does the author want us to do exactly, please?
Does it mean that we should define some characters as separators for counting the words? That is those characters will be borders of the words that don't include those characters?
> Does it mean that we should define some characters as separators for counting the words?
"Define a version of the word-counting program where the user can specify the set of whitespace characters."
I think that this means the we should ask the user what the white space characters are.
1 2 3
std::string ws_chars ;
std::cout << "characters to be treated as white space in a line of text: " ;
std::getline( std::cin, ws_chars ) ; // say user enters ();- {}[]
> That is those characters will be borders of the words that don't include those characters?