Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: technology discussion =?utf-8?Q?=E2=86=92?= does the world need a "new" C ? Date: Fri, 16 Aug 2024 10:56:30 -0700 Organization: None to speak of Lines: 25 Message-ID: <87jzgge4hd.fsf@nosuchdomain.example.com> References: <20240711115418.00001cdf@yahoo.com> <20240712154252.00005c2f@yahoo.com> <86o7717jj1.fsf@linuxsc.com> <20240717163457.000067bb@yahoo.com> <86a5hep45h.fsf@linuxsc.com> <87y14xsvnh.fsf@bsb.me.uk> <87sev5s51s.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Fri, 16 Aug 2024 19:56:39 +0200 (CEST) Injection-Info: dont-email.me; posting-host="1d04e40206551ed72fc82578ee5a10bf"; logging-data="1604522"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+DOOhP602gg9ledQTvhaba" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:BJSxLNT2mSuG3ajDbaAYzWztEJ8= sha1:R9kbJ7IMraBO70TTjXiLqELB+U4= Bytes: 2261 David Brown writes: [...] > In C++, you can't pass arrays as parameters at all - the language > inherited C's handling of arrays. You can, of course, pass objects of > std::array<> type by value or by reference, just like any other class > types. #include typedef int array42[42]; void func(array42& param) { assert(sizeof param == 42 * sizeof(int)); } int main() { array42 arg = { }; func(arg); } I suggest that this is not the best place to discuss the nuances of C++. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */