Is this the correct way to convert a std::vector to a C array or is there a function that returns the vector as an array?
Code:
std::vector<int> MyVector;
//Fill MyVector
int a[MyVector.size()];
for(int i = 0; i < MyVector.size(); i++)
a[i] = MyVector[i];
Comment