【问题标题】:candidate function not viable: no known conversion from 'int [8][3]' to 'int **' for 1st argument候选函数不可行:第一个参数没有从 \'int [8][3]\' 到 \'int **\' 的已知转换
【发布时间】:2022-12-04 11:06:04
【问题描述】:

I need to use array in function, but i just get error every time when i run programm.

I tried to make a little render programm, and i was trying to make it using arrays. After many attempts i still cant repair it, can you help me, give some advices like: how can i avoid it, or repair it.

It\'s not code of programm, it is just example.

#include <iostream>

void func_W(int*arr[])

{

   for(int i=0;i<8;i++){for(int j=0;j<3;j++){

         std::cout << arr[i][j];

         arr[i][j] = 1;

         std::cout << arr[i][j];

      };};

};

int main()

{

    int arr1[8][3];

    func_W(arr1);

}

    标签: c++ arrays


    【解决方案1】:
    猜你喜欢
    • 2021-04-21
    • 2018-10-08
    • 1970-01-01
    • 1970-01-01
    • 2020-08-26
    • 2022-07-29
    • 1970-01-01
    • 1970-01-01
    • 2018-06-25
    相关资源
    最近更新 更多