How can I pass a dynamic multidimensional array to a function?

后端 未结 9 2301
再見小時候
再見小時候 2020-12-19 05:48

How can I pass a multidimensional array to a function in C/C++ ?

The dimensions of array are not known at compile time

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-19 06:10

    Section 3.4 on this page addresses your question:

    http://www.programmersheaven.com/2/Pointers-and-Arrays-page-2

    Of course variable-length arrays were not present in C until C99 and as far as I know they are not present in C++. Also, MSVC does not implement/support C99.

提交回复
热议问题