Since i am not sure about the number of events i am going to add, the events are added in the following manner:
eventList.push_back(event1);
Now there is another third party API that does not take the vector in the function parameter, instead it takes const cl_event *event_list as one of the function's input parameter.
Is there any STL function that converts the stl vector to the typical array or i have to do it manually ?
You don't indicate what the duration of visibility to the array is by the third party API.
Keep in mind that if the API keeps the address of the array around after the call, and you push_back more events, vector may reallocate the array, thereby invalidating the address passed to the API.