Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: Divide and C Message-ID: <29656:Mar3120:36:2791@kramden.acf.nyu.edu> Date: 31 Mar 91 20:36:27 GMT References: <1991Mar27.185804.7221@uunet.uu.net> Organization: IR Lines: 14 In article lamont@amdahl.uts.amdahl.com (Duane Richard LaMont) writes: > ++((int *) array)[val]; > However, if your program uses arrays of pointers to arrays of > integers, the above won't work and there is no counterpart solution. This is a common argument of Fortran programmers against the common C trick of keeping a table of pointers to each row of an array. It's an incorrect argument. You can allocate the array contiguously, and use the pointer to the first row *exactly* the same way as ``array'' in the above example. (Btw, I'm not accusing you of being a Fortran programmer. :-) ) ---Dan