I'm trying to determine whether an object is already contained within a std::set. According to msdn (and other sources) the set::find function is supposed to return end() if it doesn't find the element you asked for.
However when I implement code like the following, set::find returns junk (0xbaadf00d) instead.
set<Cell*> cellSet;
Cell* cell = new Cell();
if (cellSet.find(cell) == cellSet.end())
{
...
}
Am I using this correctly? I'm working in Visual C++ 2005.