I am hoping someone can help me understand this.
I ran into this code:
vector<string> split_string(string input_string) {
string::iterator new_end = unique(input_string.begin(), input_string.end(), [] (const char &x, const char &y) {
return x == y and x == ' ';
});
I am not sure what the ::
represents, I have never seen it used this way before. Maybe it is an alternative to using string.iterator
?
Also, I am a bit confused regarding to member types in a class on cppreference.com:
string
is a type of class, how do all these member types relate to string
, or any other class's relationship with its own inherit member types?
I would really love some guru advice here.