Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: usecases of void foo(char **b) {} Date: Sat, 05 Nov 2016 14:09:03 -0700 Organization: None to speak of Lines: 18 Message-ID: References: <2199a2dd-d844-4f8d-bfe0-6a7c2854277b@googlegroups.com> <87twbqlsin.fsf@bsb.me.uk> <87oa1yljof.fsf@bsb.me.uk> <87ins5k15t.fsf@bsb.me.uk> <87bmxxm6zs.fsf@gmail.com> <871syrijhw.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="068e13fa936d4e49cf562f96621eaf4d"; logging-data="30532"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yYjeWyB3FACLJ0DUGGLZp" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:qeM4GZ/5GTJXKOqja4k6VBFOYLI= sha1:TSwizrtEHvZUYIRHfKu9ccCae8A= Xref: csiph.com comp.lang.c:95856 Ian Collins writes: [...] > My point was if you don't like the ambiguity of arrays and pointers, in > C++ if you want to pass an array, you pass an array type. If you want > to pass a matrix, you pass a matrix type. In C++ you hardly ever have > to pass a naked pointer. To be clear, C++ still has all the same pointer and array semantics that C has. It *also* has types defined in its standard library (std::vector, std::array, various "smart pointer" types) that implement pointer and array semantics is an arguably more convenient way. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"