given a string s of type std::string I build another string s2 like so
std::string(s.begin(), s.begin() + s.find(" "))
but the following constructor doesn't work
std::string(s.begin(), s.find(" "))
anyone knows why ? I'm using g++ 4.8.1 under Ubuntu amd64
Both constructors have an iterator as second argument.
In this example I'm trying to build a string containing the first sub-string that ends where the first whitespace appears.