Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!bouma From: bouma@cs.purdue.EDU (William J. Bouma) Newsgroups: comp.lang.c Subject: pointers to pointers to functions Summary: help! Message-ID: <8247@medusa.cs.purdue.edu> Date: 12 Oct 89 17:03:26 GMT Distribution: usa Organization: Department of Computer Science, Purdue University Lines: 28 I need a list of pointers to functions to be malloced. What is the syntax? I declared this thing to hold it: int (**f)(); And then I tried mallocing some space for it like this: f = (int (**)()) malloc(n * sizof(*f)); When the compiler hits that line I get this: illegal lhs of assignment operator unacceptable operand of & warning: illegal pointer/integer combination, op = cannot recover from earlier errors: goodbye! ?????? Also, C doesn't care if I call the function: (*f[x])(); or (f[x])(); ie. both of these work. Why? Is the first one the "correct" way? -- Bill || ...!purdue!bouma