I have a std::map of HANDLE objects,
std::map<int, HANDLE> MyMap;
I have to wait on these handle objects using WaitForMultipleObjects() function. For that i have to get the map contents as an array of HANDLE objects.(if it was a vector, then we can use vector.data() function). And I am looking for such a simple function to achieve this.
Assuming you’re using a reasonably recent version of VC++ (2010 or 2012), or g++ (4.6 or newer), you should be able to do something like this: