Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Regarding assignment to struct Date: Mon, 05 May 2025 13:53:10 -0700 Organization: None to speak of Lines: 13 Message-ID: <877c2uhj9l.fsf@nosuchdomain.example.com> References: MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Mon, 05 May 2025 22:53:11 +0200 (CEST) Injection-Info: dont-email.me; posting-host="ce0368853eba606cbaed4ff885db219e"; logging-data="1343581"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JqCbhkSISa9M2zMxAYSTo" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:AOW7jaJ4LITBL54UAVHXIc3Mhps= sha1:ClRNyogAIYqYb+O7xlXR4ZN3Z6I= 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 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. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */