|
-
August 5th, 2010, 10:03 AM
#1
[RESOLVED] std::set<int> can't find negative value
Using unmanaged C++ in Visual Studio 2005. I am using a std::set<int> collection to hold some integer values. I recently found a bug where only the positive values were able to be checked and not the negative values.
If I put the value 111 in the collection, then do a .find(111), then it finds the value as expected. But if I put the value -111 in the collection, then do a .find(-111), then it just returns the end() pointer. Is this the way the std::set collection is supposed to work?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|