Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!clyde!cbatt!ihnp4!inuxc!pur-ee!uiucdcs!uiucuxc!hamilton From: hamilton@uiucuxc.cso.uiuc.edu Newsgroups: comp.sys.amiga Subject: Re: argv[n][n] doesn't exist Message-ID: <172200010@uiucuxc> Date: Sun, 7-Dec-86 13:31:00 EST Article-I.D.: uiucuxc.172200010 Posted: Sun Dec 7 13:31:00 1986 Date-Received: Mon, 8-Dec-86 22:19:13 EST References: <816@ulowell.UUCP> Lines: 19 Nf-ID: #R:ulowell.UUCP:816:uiucuxc:172200010:000:854 Nf-From: uiucuxc.cso.uiuc.edu!hamilton Dec 7 12:31:00 1986 walton@ametek says: > Ahem...argv is not a two dimensional array, but rather an array of pointers. > As such, it CANNOT be addressed with two subscripts as argv[n][n]. There > is a difference, see K&R for details. actually, argv isn't even an array of pointers; it's a pointer to an array of pointers. true, there ARE some differences; "sizeof(argv)" is independent of the size of the strings, for instance. but it is time-honored tradition to reference arg string characters by double-indexing argv. this is part of the beauty of C's pointer/array semantics. wayne hamilton U of Il and US Army Corps of Engineers CERL UUCP: {ihnp4,pur-ee,convex}!uiucdcs!uiucuxc!hamilton ARPA: hamilton%uiucuxc@a.cs.uiuc.edu USMail: Box 476, Urbana, IL 61801 CSNET: hamilton%uiucuxc@uiuc.csnet Phone: (217)333-8703 CIS: [73047,544] PLink: w hamilton