Sign in to follow this  
hothead

what does npos mean?

Recommended Posts

"The largest possible value of type size_type. That is, size_type(-1)", where size_type is "an unsigned integral type." Therefore, npos is the "rollover" value of that unsigned type. It serves to indicate an index that std::string cannot support, and many indexing methods return it to indicate "end of string".

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this