C++ vector > to double **

后端 未结 3 596
挽巷
挽巷 2020-12-06 11:30

I\'m trying to pass a variable of type vector > to a function F(double ** mat, int m, int n). The F function comes from

3条回答
  •  离开以前
    2020-12-06 12:07

    The way I see it, you need to convert your vector > to the correct data type, copying all the values into a nested array in the process

    A vector is organised in a completely different way than an array, so even if you could force the data types to match, it still wouldn't work.

    Unfortunately, my C++ experience lies a couple of years back, so I can't give you a concrete example here.

提交回复
热议问题