Why isn\'t the size of an array sent as a parameter the same as within main?
#include
void PrintSize(int p_someArray[10]);
int main () {
Because arrays decay into pointers when they are passed as parameters. This is how C works, although you can pass "arrays" in C++ by reference and overcome this issue. Note that you can pass arrays of different sizes to this function:
// 10 is superfluous here! You can pass an array of different size!
void PrintSize(int p_someArray[10]);