how to pass 2 dimensional array if both dimensions are unknown at compile time

后端 未结 5 1668
[愿得一人]
[愿得一人] 2021-01-20 16:26

what is this the correct way to pass 2 dimensional array of unknown size?

reprVectorsTree::reprVectorsTree(float tree[][], int noOfVectors, int dimensions)
<         


        
5条回答
  •  孤独总比滥情好
    2021-01-20 16:41

    Use pointers..

         reprVectorsTree(tree, noOfVectors, dimensions);// Calling function.
    

    Function Definition:

    reprVectorsTree(float **tree, int noOfVectors, int dimensions){
    
    
    }
    

    I think it will be helpful to you.

提交回复
热议问题