Xref: utzoo comp.sys.amiga.tech:14824 comp.sys.amiga:67721 Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!rutgers!cbmvax!daveh From: daveh@cbmvax.commodore.com (Dave Haynie) Newsgroups: comp.sys.amiga.tech,comp.sys.amiga Subject: Re: help: C++ Keywords: help C++ Message-ID: <14812@cbmvax.commodore.com> Date: 2 Oct 90 18:39:44 GMT References: <26ed022f-8f5comp.sys.amiga.tech@tronsbox.xei.com> <980@iceman.jcu.oz> <28364@pasteur.Berkeley.EDU> Reply-To: daveh@cbmvax.commodore.com (Dave Haynie) Organization: Commodore, West Chester, PA Lines: 31 In article <28364@pasteur.Berkeley.EDU> c150-ec@danube.Berkeley.EDU.UUCP (Johnson Sieu) writes: > I wanted to define a function that accepts a function pointer in C++ > and the compiler complained. [..program deleted.. ] > The compiler doesn't seem to accept my argument declaration for func! > I compiled it under Lattice C and everything is fine. What is the > problem then? Could any experienced C++ programmer please help me to see > the light. In C++, you need a typedef for a function pointer type to be passed around. In your case, if you did something like: typedef void *voidfunptr(void); then you could legally do things like: void thing(voidfuncptr A) { voidfuncptr B = A; // ..... } Etc. and so forth. > Johnson -- Dave Haynie Commodore-Amiga (Amiga 3000) "The Crew That Never Rests" {uunet|pyramid|rutgers}!cbmvax!daveh PLINK: hazy BIX: hazy Standing on the shoulders of giants leaves me cold -REM