If I have a structure like this:
struct S { int arr[10]; int x; }
If I have a function
void some_fun( struct S myS );
Will the array be copied correctly when I pass the S structure of this function or will I have to change the function:
void some_fun( struct S * myS ); ?
I tested this (and it works without a pointer), but I'm a little unsure of C / C ++, sometimes it works, even if it is wrong.
user1190832
source share