| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com> |
| List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
| List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, |
| <http://sourceware.cygnus.com/ml/#faqs> | |
| Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
| Message-ID: | <37A62BE7.95925CAE@dgs.monash.edu.au> |
| Date: | Tue, 03 Aug 1999 09:38:15 +1000 |
| From: | Brendan Simon <brendan AT dgs DOT monash DOT edu DOT au> |
| Reply-To: | brendan AT dgs DOT monash DOT edu DOT au |
| Organization: | CTAM Pty Ltd |
| X-Mailer: | Mozilla 4.61 [en] (X11; I; Linux 2.0.36 i586) |
| X-Accept-Language: | en |
| MIME-Version: | 1.0 |
| To: | Ward Correll <wardless AT hotmail DOT com> |
| CC: | cygwin AT sourceware DOT cygnus DOT com |
| Subject: | Re: Maybe a Bug in Cygwin in using Pointers to class fuctions |
| References: | <19990802205215 DOT 22723 DOT qmail AT hotmail DOT com> |
Ward Correll wrote:
> =========================OUTPUT FROM CYGWIN==========================
> BASH.EXE-2.02$ c++ -o try try.cpp
> test.cpp: In function `int main()':
> test.cpp:66: assuming & on `Mammal::Speak'
> test.cpp:67: assuming & on `Mammal::Move'
> =====================================================================
> I know I want the fuction pointer to assume on Mammal::Speak or Mammal::Move
> when meets some conditions as you see. But cygwin won't let me do that.
Give this a try. It seems GCC is picky about the address of a function and/or
member function. It wants you to explicitly use the address operator as shown
below. I think this should work.
case 1: pFunc = &Mammal::Speak; break;
default: pFunc = &Mammal::Move; break;
Brendan Simon.
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |