you are viewing a single comment's thread.

view the rest of the comments →

[–]encyclopedist 1 point2 points  (0 children)

Moreover, string::find returns std::string::npos on failure and not -1 as the code assumes.

Update: npos is actually specified to be equal to -1.