So, I have this situation where I need to see if an object is in my stl map. If it isn't, I am going to add it.
char symbolName[] = { 'H', 'e', 'l', 'l', 'o', '\0' };
map<string,TheObject> theMap;
if (theMap.find(symbolName)==theMap.end()) {
TheObject theObject(symbolName);
theMap.insert(pair<string, TheObject>(symbolName,
theObject));
}
I am getting a core dump on the: theMap.find when the object is not already in the map. Supposedly, if the item is not in the map, it is supposed to return an iterator equivelent to map::end
What is going on here?
GCC: 3.4.6