www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/19/07:01:43.2

From: "Ortwin Wagner" <owsadlerhorst AT t-online DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: DJGPP doesn't understand pointer to member function
Date: Fri, 19 May 2000 12:42:47 +0200
Organization: T-Online
Lines: 21
Message-ID: <8g35td$2mt$15$1@news.t-online.com>
Mime-Version: 1.0
X-Trace: news.t-online.com 958733037 15 2781 320018852788-0001 000519 10:43:57
X-Complaints-To: abuse AT t-online DOT de
X-Sender: 320018852788-0001 AT t-dialin DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Dear fellows!

If I call a member function by means of a pointer like
...
class Mammal...
class Horse : public Mammal...
...
Mammal * ptr=0;
ptr= new Horse;
void (Mammal::*pFunc)() const=0;
pFunc=Mammal::Speak;
(ptr->*pFunc)();
...
DJGPP returns a strange error message: "Assuming & on Mammal::Speak". As far
as I know the code is completely correct and so it looks like a lack of
intelligence of the compiler, doesn't it?

Yours sincerely
Ortwin


- Raw text -


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