Hi.
How do you define a functor that handles elements in an STL map? For example:
How do you define DeleteValue functor that handles elements in an STL map?Code:std::map<int, char *> testMap; char *testChar = new char[10]; _strcpy(testChar, "November"); testMap.insert(std::pair<int, char *>(0, testChar)); ... // Now I want to deallocate all values in testMap. std::for_each(testMap.begin(), testMap.end(), DeleteValue());
Thanks,
Kuphryn