STL map question
Posted on 2006-11-10
I need to store some objects in a map. Then if 'needed' I have to modify the objects in the map and put them back.
Later, I am given an object which I have to compare with the objects in the map and see if it has been modified.
Can I modify the object and put it back. Or I need to remove the object to be modified and then put the modified object back to map?
The other question is how can I check if it is modified without doing a memberwise comparision?
typedef map<string, Test> myMap_t;
void insertToMap(string key, Test test);
bool isModifed(Test newTest);
void MyMapClass::insertToMap( string key, Test test)
void MyMapClass::modify(string key )
// if we have an object for the key modify...
bool MyMapClass::isModifed(Test newTest)
//return true if it is modified else false