Hi
gives:
0xfcffc53c 0xfcffc53c 40 4
gives:
0xfcffc53c 0xfcffc53c 40 4
Obviously you only want to access the array type.
printf("%s %d\n", __PRETTY_FUNCTION__, sizeof(Array));in the function in example 3 (with gcc). This gives for your version:
void function(int *) 4 Weird Failure: (*element)[9] = 0 Weird Success: (*element)[9] = 321
If you change the function declaration to pass by reference:
void function(t_Array &Array)
you will get this result:
void function(int (&)[10]) 40 Weird Failure: (*element)[9] = 321 Weird Success: (*element)[9] = 321
and everything seems to work as expected. With the same change you can get example 2 to work.