Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!rutgers!texbell!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: A pointer to a 3-D array, or an array of ptrs to 2-D arrays? Message-ID: <6982@ficc.uu.net> Date: 15 Nov 89 20:42:47 GMT References: <2765@levels.sait.edu.au> Reply-To: peter@ficc.uu.net (Peter da Silva) Organization: Xenix Support, FICC Lines: 14 In article <2765@levels.sait.edu.au> MARWK@levels.sait.edu.au writes: > (1) p = (int (*) [13][2][64]) malloc (sizeof(int) * 13 * 2 * 64) > *p[i][j][k] = 6 Try !(*p)[i][j][k]!. This is why I wish indirection was postfix. In "My Ideal C" this would be !p^[i][j][k]!. (I'm going to start a C-FUTURES mailing list soon, for discussions of this nature. Mail to peter@ficc.uu.net if you want to join.) -- `-_-' Peter da Silva . 'U` -------------- +1 713 274 5180. "*Real* wizards don't whine about how they paid their dues" -- Quentin Johnson quent@atanasoff.cs.iastate.edu