Path: utzoo!attcan!uunet!wuarchive!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!isl1.ri.cmu.edu!cycy From: cycy@isl1.ri.cmu.edu (Scum) Newsgroups: comp.sys.sgi Subject: comparing pointers to void functions Message-ID: <9454@pt.cs.cmu.edu> Date: 29 May 90 22:10:28 GMT Organization: Carnegie-Mellon University, CS/RI Lines: 32 Okay, this is a better tested question. I'm having a problem trying to determine if a pointer is pointing to a certain function. The pointer is defined as an element in a structure thusly: struct object { ... void (*formstart) (); ... } As you can see, it is a pointer to a function which returns void. Now, I can successfully invoke the function as: struct object *thing; ... (thing->formstart)(); However, the compiler will not accept the following attempt to compare the pointer to the address of the function, even though when they are printed out, their values are the same: if (thing->formstart == bgnpolygon) The compiler says "operands of == have incompatible types". This doesn't seem right to me. Can anyone out there help me.... Please? -- Chris. -- -- Chris. (cycy@isl1.ri.cmu.edu) "People make me pro-nuclear." -- Margarette Smith