Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!nic.MR.NET!shamash!com50!jhereg!mark From: mark@jhereg.Jhereg.MN.ORG (Mark H. Colburn) Newsgroups: comp.lang.c Subject: Re: Point me in the right direction Message-ID: <584@jhereg.Jhereg.MN.ORG> Date: 24 Feb 89 14:27:41 GMT References: <23631@watmath.waterloo.edu> <1841@mit-caf.MIT.EDU> <1043@auspex.UUCP> <3735@arcturus> Reply-To: mark@jhereg.MN.ORG (Mark H. Colburn) Organization: Minnetech Consulting, Inc., St. Paul, MN Lines: 20 In article <3735@arcturus> evil@arcturus.UUCP (Wade Guthrie) writes: >> Of course, adding: >> #define N_FCONSTS (sizeof(fund_consts)/sizeof(double)) >This is all well and good, but what about arrays of structures? Am I >S.O.L. because of inter-array-element padding if I: It may be easier to use #define N_WHATEVER (sizeof(snarf)/sizeof(snarf[0])) This works for any array that has a static size and constant sized elements (the majority of the cases where you would want to use this kind of trick anyways). -- Mark H. Colburn "Look into a child's eye; Minnetech Consulting, Inc. there's no hate and there's no lie; mark@jhereg.mn.org there's no black and there's no white."