How do I convert a std::vector to a double array[]?
std::vector
double array[]
If you have a function, then you probably need this:foo(&array[0], array.size());. If you managed to get into a situation where you need an array then you need to refactor, vectors are basically extended arrays, you should always use them.
foo(&array[0], array.size());