From: "OmniMeta"
Newsgroups: comp.os.msdos.djgpp
References: <3792ab60 DOT 19410885 AT newsserver DOT cc DOT monash DOT edu DOT au>
Subject: Re: Need help with class stuff
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Message-ID:
Date: Mon, 19 Jul 1999 14:34:18 -0300
NNTP-Posting-Host: 207.253.161.92
X-Complaints-To: abuse AT videotron DOT net
X-Trace: wagner.videotron.net 932409040 207.253.161.92 (Mon, 19 Jul 1999 14:30:40 EDT)
NNTP-Posting-Date: Mon, 19 Jul 1999 14:30:40 EDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com
I know this, but now, the pointer is inside the class.
I tried it before and I get a parse error when calling the fonction :
(ClassTest.*Action)();
Davin McCall a écrit dans le message :
3792ab60 DOT 19410885 AT newsserver DOT cc DOT monash DOT edu DOT au...
> Pointers to non-static member functions take a "hidden" parameter,
> which is the object on which they are to operate. So, to declare a
> pointer to a member function, you do:
>
> (::*)();
>
> for example, your:
>
> > void (*Action)(); // my pointer
>
> Should be: void (Test::*Action)();
>
> Davin.
> __________________________________________________________
> *** davmac - sharkin'!! davmac AT iname DOT com ***
> my programming page: http://yoyo.cc.monash.edu.au/~davmac/