The correct way in C++ is to not use arrays, but to use vectors instead. You can then pass vector references to your function just as you would pass references to any other object types.
If you choose to use arrays rather than vectors, then you must pass a reference to the first element in each array, along with the number of elements in each array, just as you would have to if you were writing for C rather than C++.
Copyright © 2026 eLLeNow.com All Rights Reserved.