• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Programming Question

Mikealot

Member
Guys, could someone tell me what the C++ String member function "find" returns if it does not find the item being searched?
 
It will return the static constant string::npos (which is the largest possible value of size_type, or -1)
It's a matter of style, but I'm on the side of comparing to this constant rather then -1 directly.
 
Back
Top