Hi, I want to create a map of named events from a const array.
eg std::map<std::string, HANDLEthis needs to be intialised so that
initially it will be contain the names of the all the events with a
NULL handle then
i can do the following
std::map<std::string, HANDLEEvents;
std::map<std::string, HANDLE>::iterator it;
const std::string[] { "EventName1", "EventName2", "EventName3"};
it = Events.begin();
while (it != Events.end())
{
Events[it->first] = CreateEvent(NULL,FALSE,FALSE, it->first.c_str())
++it;
}
So i f i ever need a new event all i need to do is add it to the array
and the event will be created
managed, destroyed just using the map.
However do i use the string array to initalise the map keys however?