Pass By Reference Multidimensional Array With Unknown Size

前端 未结 5 550
没有蜡笔的小新
没有蜡笔的小新 2021-01-21 10:36

How to pass by reference multidimensional array with unknown size in C or C++?

EDIT:

For example, in main function I have:

int main(){
    int          


        
5条回答
  •  借酒劲吻你
    2021-01-21 10:58

    John Bode's explanation is very good, but there is a little mistake: it should be

    i * cols + j
    

    instead of

    i * rows + j
    

提交回复
热议问题