Is there a way to find how many values an array has? Detecting whether or not I\'ve reached the end of an array would also work.
For C++/CX (when writing e.g. UWP apps using C++ in Visual Studio) we can find the number of values in an array by simply using the size()
function.
Source Code:
string myArray[] = { "Example1", "Example2", "Example3", "Example4" };
int size_of_array=size(myArray);
If you cout
the size_of_array
the output will be:
>>> 4