manipulating multidimensional arrays with functions in C++

后端 未结 4 1555
南笙
南笙 2020-12-18 16:31

I am trying to modify the contents of a 2D array in C++ using a function. I haven\'t been able to find information on how to pass a 2D array to a function by reference and

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-18 17:07

    can you check on this:

    #include 
    #include 
    
    void printArrays(int* array[], int len1, int len2) {
      for (int i=0; i

提交回复
热议问题