Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: shared memory question/ array of structures Message-ID: <1990Oct05.182804.27340@virtech.uucp> Date: 5 Oct 90 18:28:04 GMT References: <628@ge1ccj.Quotron.com> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 21 In article <628@ge1ccj.Quotron.com> jeff@ge1ccj.Quotron.com (jeff marder) writes: > >Suppose I want to define a shared memory segment that is an array of >structures. Do I need to declare the array of structures in my program, >or only a pointer to an array of structures to make a shared memory >attach? You could use an array of pointers to shared memory locations or a pointer to an array of structures. > How do you declare a pointer to an array of structures? cdecl> declare x as pointer to array 5 of int int (*x)[5] cdecl> declare x as pointer to array 5 of struct tmpstruct struct tmpstruct (*x) [5] -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170