Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!rochester!uhura.cc.rochester.edu!sunybcs!bingvaxu!leah!rpi!batcomputer!cloos From: cloos@batcomputer.tn.cornell.edu (James H. Cloos Jr.) Newsgroups: comp.lang.c Subject: Dynamic allocation of multi-d arrays Message-ID: <8236@batcomputer.tn.cornell.edu> Date: 22 Jun 89 06:27:18 GMT Reply-To: jhc@vax5.cit.cornell.edu (James H. Cloos Jr.) Distribution: na Organization: Cornell Information Technologies, Ithaca, NY 14853 Lines: 26 Hello, Is it possible to dynamically allocate a multi-dimentional array using the standard Unix libraries? How is this done? I believe I understand how to do single-d arrays, but haven't seen anything suggesting how to do multi-d. Or at least 2-D. Do you have to set up a single-d array and use a pointer to specify the beginning of the current 'row?' I hope this isn't too much of a novice-mode question, but an application I'm starting to work on is the first I've done that needs dynamic multi-d arrays--unless I can come up with a better algorithm. ;^) Thank you for any info! -JimC -- James H. Cloos, Jr. "Entropy isn't what it used to be." jhc@Crnlvax5.BITNET --c/o Fortune @ batcomputer.UUCP jhc@Vax5.CCS.Cornell.ED #include cornell!vax1!vax5.cit.cornell.edu!jhc@rochester.UUCP B-7 Upson Hall, Cornell Univ., Ithaca, NY 14853 +1 607 272 4519 Urgent mail to: cloos@TcGould.TN.Cornell.EDU cloos@CrnlThry.BITNET or: batcomputer!cloos@cornell.UUCP