unsigned int countLargerThan( int* arrayValuesToCheck, unsigned int sizeToCheck, int minimumValue );
When the first four values in the array are 5, 32, -12, 53, sizeToCheck is 4, and minimumValue is 5, the function will return 2.
You may not use indexes or [] within this function. You must use pointer arithmetic to cycle through the array elements along with the * and the & operators.
2. Write a C++ main function to test your countLargerThan() function. You may use [] notation when you declare the array.
Sheesh. The assignment may as well read "do this the hard way instead of the easy way."
The code below walks through the array with a pointer. Note the limit of the for loop (arrayValuesToCheck+sizeToCheck). This works because pointer arithmetic is always scaled by the size of the thing pointed to. So if you have int *p then p+2 does not refer to two bytes after p, it refer to two integers after p. In other words, to compute p+2, the compiler generates code to to compute p + 2*sizeof(int).