how to check for the number os spaces in a line of words?
wad code must i use?
is it isspace()?
Pointers to a cstring can be used in place of those iterators too.
and you need to #include <algorithm>
for std::count.
Also
std::count_if( text.begin(), text.end(), isspace )
if by "space" you also mean hard spaces, tabs, and/or newlines.