> On most C syntax I do just fine, but function pointers are always a > head-scratcher for me. Yes, it can be a real pain... >=20 > If I wanted to declare a pointer to this function: >=20 > int foo(int bar); >=20 > What would be the syntax for the declaration? >=20 > The best I came up with was this: >=20 > (int)(*)(int) pfoo =3D &foo; >=20 Try: int (*pfoo)(int bar)=3Dfoo;=09 You don't need to do &foo. If you want to declare an array of function pointers you have=20 to do it like this: int (*pfunarray[])(int bar)=3D{ one_fun, another_fun, andsoon_fun, NULL }; The NULL is only needed if you dynamically want to scan the=20 array and like to know where it ends. Note that int C++ you can only get a pointer to a class member=20 function if it is declared as static (because of the this=20 pointer that otherwise also would be needed). Regards / Ruben =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Ruben J=F6nsson AB Liros Electronic Box 9124, 200 39 Malm=F6, Sweden TEL INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body