vector<vector<double> >and double**- completely different types. But this function can be served using another vector that stores several double pointers:
vector<vector<double> > thing = ...;
vector<double*> ptrs (thing.size());
for (unsigned i=0, e=ptrs.size(); i<e; ++i) {
ptrs[i] = &(thing[i][0]); // assuming !thing[i].empty()
}
your_function(&ptrs[0],...);
One reason this works is because std :: vector ensures that all elements are stored sequentially in memory.
source
share