Sujet : Re: Regarding assignment to struct
De : Muttley (at) *nospam* DastardlyHQ.org
Groupes : comp.lang.cDate : 06. May 2025, 08:16:24
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vvcd07$2eh4j$1@dont-email.me>
References : 1 2 3 4
On Mon, 05 May 2025 13:53:10 -0700
Keith Thompson <Keith.S.Thompson+
u@gmail.com> wibbled:
Muttley@dastardlyhq.com writes:
[...]
If you twant o pass an actual array to a function instead of a pointer to it,
>
embedding it in a structure is the only way to do it.
>
Yes, but that's not necessarily useful. An array that's a member
Depends what you're doing. Passing an array in a structure will copy the array
saving you having to do it yourself if you don't want to work on the original
version. Obviously that doesn't happen if you just pass a pointer.