determining the size of an array when passed by ref
Is there a reason why I get the correct result when I use this approach within the function that I instantiated my class as an array but when I do the same thing in a function where I pass the array class (byref) I get 1?
Code:
sizeof array / sizeof array[0]
The suggestion was made that I should have used the "vector" class as an alternative approach to create my class array instead of using native arrays. As this would provide some built-in features for the array, such as storing the size and allowing dynamic sizing, while also providing some safety, such as range-checking.