Hi Guys,
How to pass a 2 dimensional Vector to a function in CPP ? I saw the examples for 1 dimension but not for 2 dimensions.
If it is passed, is it passed by value or by reference ?
vector< vector<int> > matrix1(3, vector<int>(3,0)); //Matrix Declaration.
printMatrix(&matrix1); // Function call
void printMatrix(vector< vector<int> > *matrix) // Function Definition