www.delorie.com/archives/browse.cgi | search |
From: | "OmniMeta" <meta AT abacom DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
References: | <TnNj3.667$3C2 DOT 65692 AT wagner DOT videotron DOT net> <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: | <k9Kk3.1092$Vh.62058@wagner.videotron.net> |
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 <DavMac AT iname DOT com> 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: > > <return-type> (<class-name>::*<pointer-name>)(<argument-list>); > > 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |