passing 2d vector to function c++ code example
Example: c++ passing vector to function
// Pass by value
void print(std::vector<int> arr) { }
// Pass by reference
void print(std::vector<int>& arr) { }
// Pass by value
void print(std::vector<int> arr) { }
// Pass by reference
void print(std::vector<int>& arr) { }