Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sunybcs!acsu.buffalo.edu From: axaris@acsu.buffalo.edu (vassilios e axaris) Newsgroups: comp.lang.c Subject: Re: Using printer with turbo C? Summary: Multi dimensional arrays Message-ID: <31506@eerie.acsu.Buffalo.EDU> Date: 25 Jul 90 23:37:53 GMT References: <28289@cc.usu.edu> Sender: news@acsu.Buffalo.EDU Organization: SUNY Buffalo Lines: 16 Nntp-Posting-Host: autarch.acsu.buffalo.edu Hello, I have the following problem: I need to use a 4 dimensional array of which only the last dimension I know. I found out that: array_name[][][][50] doesn't work (it's in there - K&R :-)). I tried to declare a pointer to a pointer to a pointer to a pointer...e.t.c but to no avail. I allocate memory with calloc of course. I would appreciate some info. on this: how to declare such a beast, how to allocate memory for the other dimensions, and how to prototype it. And if there is some time left, I need some enlightenment on the following: (*)[10] is a pointer to an array of 10. (*(*))[10] is a pointer to a pointer to an array of 10? And if the size of 10 is not specified is this equivalent to *** ? Thank you in advance. Vassilios E. Axaris.