Liste des Groupes | Revenir à cl c |
On 05/05/2025 22:53, Keith Thompson wrote:Muttley@dastardlyhq.com writes:it,
[...]If you twant o pass an actual array to a function instead of a pointer to>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
of a struct can only be of a constant length (unless it's a flexible
array member, but that doesn't help). Functions that work with
arrays typically need to deal with arrays of arbitrary length.
I regularly use arrays with known fixed sizes. In fact, in my code
those are absolutely dominant - it is very rare for me to see or use an
array whose size is /not/ fixed at compile time. Sometimes I will have
Les messages affichés proviennent d'usenet.