Convert from std::vector> to float**

There is a function which takes a float** parameter. I have the values in a variable of type std::vector>.
Is it possible to make such a conversion without allocating a temporary float*[] ?

#include 
#include 
#include 
#include 

using namespace std;

void compare(int m, int n, float **score)
{
    for(int i=0; i vec1(n);
    vector> vec2;
    for(int i=0; i target(vec2.size());
    for (int i = 0; i < vec2.size(); ++i)
    {
        target[i] = &*vec2[i].begin();
    }
    compare(m, n, target.data());

    for(int i=0; i

你可能感兴趣的:(Convert from std::vector> to float**)