Does anyone know what I'm doing wrong?
Trying to use assignment to copy a structure using a flexible array element. From the standard (6.7.2.1):
*s1 = *s2
n
[.. , ]; - sizeof (struct s)
, .
, C , , , , , , , :
, , , , , .
, sizeof(*one)
, , , *oneCopy = *one;
.
, , , malloc
memcpy
. , - ( , ), , one->friends
oneCopy->friends
.