I have a c++ function which returns std::vector of integer. I need to save all the values in vector to array for using it in C multiple functions
How can I convert vector to std array, I want array to be static
int* getGroupIds()
{
//Do code refactor for effcient access
vector<uint32_t> vec_groupIDs = m_scanConfig->GetGroupIds();
const int size = vec_groupIDs.size();
int arr[size];
std::copy(vec_groupIDs.begin(), vec_groupIDs.end(), arr);
return arr;
}