Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.UUCP (Conor P. Cahill) Newsgroups: comp.lang.c Subject: Re: pointers to pointers to functions Message-ID: <1268@virtech.UUCP> Date: 13 Oct 89 01:32:16 GMT References: <8247@medusa.cs.purdue.edu> Distribution: usa Organization: Virtual Technologies Inc Lines: 24 In article <8247@medusa.cs.purdue.edu>, bouma@cs.purdue.EDU (William J. Bouma) writes: > int (**f)(); > > And then I tried mallocing some space for it like this: > > f = (int (**)()) malloc(n * sizof(*f)); ^^^^^ sizeof( This worked fine (without any compiler complaints) on both gcc and pcc under System V/386 Rel 3.2. > ?????? Also, C doesn't care if I call the function: > (*f[x])(); or (f[x])(); The first one is conceptually correct, but most compilers will allow both of them. I *think* ANSI requires that both be accepted. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+