C++ casting static two-dimensional double array to double**

前端 未结 2 1771
隐瞒了意图╮
隐瞒了意图╮ 2021-02-14 18:55

I have such matrix in my program:

double m[3][4] = 
    {
        {2, 4, 5, 7},
        {4, 5, 1, 12},
        {9, 12, 13, -4}
    };

And I\'d

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-14 19:21

    You can't.

    The notation double** refers to an array of pointers. You don't have an array of pointers, you have an array of arrays of doubles.

提交回复
热议问题