🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #5471

help: C++

#5471
From: Johnson Sieu
Date: Mon, 01 Oct 1990 06:23
28 lines
1193 bytes
   I wanted to define a function that accepts a function pointer in C++
   and the compiler complained.  My program is as follows:

   void foo ()
   {
   }

   void foobar(void (*func)())
   {
	void (*temp_func)();

	temp_func = func;
   }

   int main()
   {
	foobar(&foo);
   }

   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.  


   Johnson
   email:  c150-ec@danube.berkeley.edu
Technical Details
Message-ID: <28364@pasteur.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!agate!pasteur!danube.Berkeley.EDU!c150-ec
References: <26ed022f-8f5comp.sys.amiga.tech@tronsbox.xei.com> <980@iceman.jcu.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!agate!pasteur!danube.Berkeley.EDU!c150-ec
From: c150-ec@danube.Berkeley.EDU (Johnson Sieu)
Newsgroups: comp.sys.amiga.tech,comp.sys.amiga,comp.sys.amiga.hardware
Subject: help: C++
Keywords: help C++
Message-ID: <28364@pasteur.Berkeley.EDU>
Date: 1 Oct 90 06:23:39 GMT
References: <26ed022f-8f5comp.sys.amiga.tech@tronsbox.xei.com> <980@iceman.jcu.oz>
Sender: news@pasteur.Berkeley.EDU
Reply-To: c150-ec@danube.Berkeley.EDU.UUCP (Johnson Sieu)
Organization: UC Berkeley Experimental Computing Facility (XCF)
Lines: 28