Why even multiply with `count`? The size of the struct is always the same. It only contains a pointer, not the characters themselves.
Nope. It fills the memory described by the pointer with the list elements. In C/C++
int*
is basically the same as
int[]
. The struct size is ofc. the same, but the number of elements in the array might be different each time, so you have to alloc enough space to prevent buffer overrides (thats what happening without the *count).