pass vector objects to a function in 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) { }