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 () {
In c++ you can pass an array by reference for this very purpose :
void foo(int (&array)[10]) { std::cout << sizeof(array) << "\n"; }