I'm trying to create a function which determines length of Array. My code doesn't work, please HELP!
#include <iostream>
using namespace std;
int ArrayLength(int Array[])
{
int i = 0;
while (Array[i] != NULL)
{
i++;
}
return i;
}
int main(void)
{
int test[5] = { 4,5,6,7,1 };
int testLen = ArrayLength(test);
cout << " test length = " << testLen;
return 0;
}