My array...
Code: Select all
int desX[] = {2730,2730,2730,2721,2728,2727,2720,2725,2728,2734,2730,2728,2730,2741,2738,2738,2732};
This function only returns one.
Code: Select all
//Declaration is like this...
int length(int array[]);
//function call from my main is...just to test it.
cout<< length(desX);
//Get array length
int length(int array[])
{
return (sizeof(array) / sizeof(array[0]));
}
Code: Select all
cout<< sizeof(desX) / sizeof(desX[0]);