Array Size in C++
Does C++ in Repl.it have a function that gives the size of an array?
Background: Other implementations of C++ have a length or size function that gives the number of elements in an array.
Example: if an array called "sample" is declared, the number of elements could be given by "sample.size()" or "sample.length()" or "_countof(sample)".
This is especially useful when passing arrays for processing in a function; the size would not have to be passed as a parameter.
I haven't been able to find something that works in Repl.it.
I believe it is something like this:
int count = sizeof(my_array)/sizeof(my_array);
This might also help: https://stackoverflow.com/questions/4839626/element-count-of-an-array-in-c