delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/24/15:46:03

From: sami3079 AT my-deja DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Pointer to a function in class?
Date: Mon, 24 Jul 2000 19:26:04 GMT
Organization: Deja.com - Before you buy.
Lines: 33
Message-ID: <8li587$566$1@nnrp1.deja.com>
NNTP-Posting-Host: 195.165.1.13
X-Article-Creation-Date: Mon Jul 24 19:26:04 2000 GMT
X-Http-User-Agent: Mozilla/4.7 [en] (Win98; I)
X-Http-Proxy: HTTP/1.1 cache.inet.fi[C0A8020D] (The_Hudsucker_Proxy/TRE/3.0.6 [uScMs f p eN:t cCMi p s ]), 1.0 x51.deja.com:80 (Squid/1.1.22) for client 195.165.1.13
X-MyDeja-Info: XMYDJUIDsami3079
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello,

How do I get a pointer to a function in class?

Here is how I've tried:

----
class myclass
{
    public:

    void myfunction();
    void otherfunction();
};

void myclass::myfunction()
{
    ...
}

void myclass::otherfunction()
{
    void *p = this->*myfunction;
}
----

If I try ''this->*myfunction'' it gives an error message,
that overload not implemented. Does this mean I can't
do this in djgpp?


Sent via Deja.com http://www.deja.com/
Before you buy.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019