|
|
const string test{ "basketball is a popular sport" };const string test = "basketball is a popular sport";const auto sp{ test.find(' ') };test.find(' ') string::npos is the special value returned by string::find if it didn't find what you're looking for.