Monday, May 24, 2010

How to pass two dimension array to function(by reference in c++)?

arrays are always passed by reference in c++ (so just pass the array like you would an int and it is passed by reference)

How to pass two dimension array to function(by reference in c++)?
void func_for_array(type** array, int size, int size2)


{


};





void main()


{


type array[10][10];


func_for_array(array,10,10);


};


No comments:

Post a Comment