[comp.lang.c] Prototype for Functions pointers in Structures

byrum@cs.odu.edu (Terry Franklin Byrum) (04/10/89)

Here is a question for all you pANS gurus.  How do you define a prototype
for a pointer to a function contained within a structure?

	e.g.	struct _fns{
			int foo;
			int (*fnsptr)();
		}fns;

My guess is:

	int (*fns.fnsptr)(void);

but MSC 5.1 gags ...

				    Thanks,

				    Frank


Frank Byrum, BROOKS Financial Systems, Suffolk VA, (804)539-7202  1st Law of SE
INET:byrum@cs.odu.edu UUCP:..!sun!xanth!{byrum,brooks!frank}  Semper Sic Factum


-- 
	Inventions have long since reached their limit --
	and I see no hope for further developments.
		- Julius Frontinus, world famous engineer, Rome, 10 AD

   First Law of Software Eng:   |  Terry Franklin (Frank) Byrum
      Semper Sic Factum         |  BROOKS Financial Systems, Inc.
   ___                          |  INET:  byrum@cs.odu.edu
  /__  _.  __. _ _  /_          |  UUCP:  ...!sun!xanth!brooks!frank 
 /   _/ \_(_/|_|\|_/ \          |  DISCLAIMER: No one listens anyway! 

ark@alice.UUCP (Andrew Koenig) (04/11/89)

In article <8400@xanth.cs.odu.edu>, byrum@cs.odu.edu (Terry Franklin Byrum) writes:

> 		struct fns{
> 			int foo;
> 			int (*fnsptr)();
> 		}fns;
> 

How about this:

		struct fns {
			int foo;
			int (*fnsptr)(void);
		} fns;
-- 
				--Andrew Koenig
				  ark@europa.att.com