passing a vector into a 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) { }