It means not found.
It is usually defined like so:
static const size_t npos = -1;
It is better to compare to npos instead of -1 because the code is more legible.
It means not found.
It is usually defined like so:
static const size_t npos = -1;
It is better to compare to npos instead of -1 because the code is more legible.