Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!icdoc!qmw-cs!morten From: morten@cs.qmw.ac.uk (Morten Ronseth) Newsgroups: comp.sys.mac.programmer Subject: Re: More on MPW C 3.0 question Message-ID: <1701@sequent.cs.qmw.ac.uk> Date: 23 Feb 90 11:04:53 GMT References: <162.25dfe4b3@waikato.ac.nz> <10311@hoptoad.uucp> <1629@sequent.cs.qmw.ac.uk> <2966@murtoa.cs.mu.oz.au> Reply-To: morten@cs.qmc.ac.uk (Morten Ronseth) Organization: Computer Science Dept, Queen Mary and Westfield College, U of London, UK. Lines: 27 References: <162.25dfe4b3@waikato.ac.nz> <10311@hoptoad.uucp> <1629@sequent.cs.qmw.ac.uk> In article <2966@murtoa.cs.mu.oz.au> you write: >In article <1629@sequent.cs.qmw.ac.uk> you write: >>References: <162.25dfe4b3@waikato.ac.nz> >Well, yes I am. char*argv[] is an array of POINTERS, not a pointer to an >array. char**argv is a POINTER to a POINTER, not a pointer to an array. >C lets you use pointers as arrays but that doesnt make them the same thing. >You CAN have pointers to arrays but your example did not have anything to it >I think you are thinking of char (*argv)[] Oops, yes, you are absolutely right. The correct notation *should* be (*argv)[]. But, according to K&R, there is such a strong relationship between pointers and arrays that they really should be treated simultanously (page 93). Morten. -- ============================================================================== Morten Lerskau Ronseth UUCP: morten@qmw-cs.uucp or ...seismo!mcvax!ukc!qmw-cs!morten JANET: morten@uk.ac.qmw.cs Post: Dept of Computer Science ARPA: morten%qmw.cs@ucl-cs.arpa Queen Mary and Westfield College Easylink: 19019285 University of London Telex: 893750 QMCUOL Mile End Road Fax: +44 1 981 7517 London E1 4NS Phone: +44 1 975 5220 England