Length of an Array in c++

Hello! I am an experienced programmer who is new to C++ and I have a simple question I cannot find a good answer to.

If want to create a function ArrayLength(int array[]) that returns the length of the array, how would I write that? I'm aware there are ways to do that in the main, but i cannot get the length outside oft the main when the arary is the argument. Thanks!

Comments (2)