Passing Multidimensional Arrays

Mikel Manitius mikel at codas.UUCP
Thu Dec 5 14:11:10 AEST 1985

> 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[];

And use i and j as boundary limits.
			Mikel Manitius @ AT&T-IS Altamonte Springs, FL

More information about the Comp.lang.c mailing list