🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50591

Help with pointers to member functions.

#50591
From: Andrew Datars
Date: Sun, 05 Sep 1993 04:56
21 lines
1476 bytes
I am trying to make a functional. That is a function which depends on
a funtion. Typically I would like to write a template class that
can be initialized with a pointer to an instance of another
class and a pointer to a member function of that class, and have
it do a bunch of things. I get parse errors when I try.
I am not so surprised. Gcc 2.4.5 has very new template support.
What is the deal with passing pointers to member functions as
a function argument. I gave up on this with 2.3.3.

Curiously if I try taking out the template logic and I have found
another problem. It seems that I get a strange error when I try
to make a class that has a public variable that is a pointer to
one of it's own member functions.

Is there any wisdom available with regard to this problem.


Thanks.

Andrew
Technical Details
Message-ID: <CCv72H.72K@helios.physics.utoronto.ca>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!darwin.sura.net!math.ohio-state.edu!cs.utexas.edu!utnut!helios.physics.utoronto.ca!datars

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,5acfc7718aa1f87,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-09-05 20:21:51 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!darwin.sura.net!math.ohio-state.edu!cs.utexas.edu!utnut!helios.physics.utoronto.ca!datars
From: datars@helios.physics.utoronto.ca (Andrew Datars)
Subject: Help with pointers to member functions.
Message-ID: <CCv72H.72K@helios.physics.utoronto.ca>
Sender: news@helios.physics.utoronto.ca (News Administrator)
Organization: University of Toronto Physics/Astronomy/CITA
Date: Sun, 5 Sep 1993 04:56:40 GMT
Lines: 22