Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site codas.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!akguc!codas!mikel From: mikel@codas.UUCP (Mikel Manitius) Newsgroups: net.lang.c Subject: Re: Passing Multidimensional Arrays Message-ID: <365@codas.UUCP> Date: Wed, 4-Dec-85 23:11:10 EST Article-I.D.: codas.365 Posted: Wed Dec 4 23:11:10 1985 Date-Received: Fri, 6-Dec-85 07:58:48 EST References: <138@brl-tgr.ARPA> Organization: AT&T Information Systems (SDSS) - Orlando Lines: 27 > I have an application where I want to pass a 2D array to a subroutine. > The data does not easily avail itself to being converted to a 1D array > of structures. How can one access the array in the subroutine??? How about this: #define X 100 #define Y 100 struct x a[Y][X]; subrout(i, j, a) int i; int j; struct x *a[]; { . . ...a[j][i]... . . } And use i and j as boundary limits. -- Mikel Manitius @ AT&T-IS Altamonte Springs, FL ...{ihnp4|akguc|attmail|indra!koura}!codas!mikel