From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mumit Khan To: "Ward Correll" Cc: cygwin@sourceware.cygnus.com Subject: Re: Maybe a Bug in Cygwin in using Pointers to class fuctions Date: Mon, 02 Aug 1999 14:18:00 -0000 Message-id: <199908022004.PAA21407@mercury.xraylith.wisc.edu> References: <19990802205215.22723.qmail@hotmail.com> X-SW-Source: 1999-08/msg00034.html "Ward Correll" writes: > Maybe a bug in Cygwin! I think that this sorce code is correct in the Final > ANSI\ISO standard on C++ so I think it could be cygwin. Please check it out > for me in this simple code. It's not a bug. Please see the discussion on pointer to member function in a recent C++ book such as Stroustrup 3rd edition. Of course, the best place is the ISO standard itself (cf: 8.3.3 [dcl.mptr]/2), but that can be rather obtuse. It's also a good idea to report what version of compiler you're using and some system/OS info (gcc -v reports the compiler version). > case 1: pFunc = Mammal::Speak; break; > default: pFunc = Mammal::Move; break; ^^^^^^ > 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. > Anyway to force compiling? The compiler gave you the answer, so use it! (hint: Mammal::Speak --> &Mammal::Speak). Followup to a C++ forum please. Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mumit Khan To: "Ward Correll" Cc: cygwin@sourceware.cygnus.com Subject: Re: Maybe a Bug in Cygwin in using Pointers to class fuctions Date: Tue, 31 Aug 1999 23:49:00 -0000 Message-ID: <199908022004.PAA21407@mercury.xraylith.wisc.edu> References: <19990802205215.22723.qmail@hotmail.com> X-SW-Source: 1999-08n/msg00034.html Message-ID: <19990831234900.q9PGD0Mrf7Um9aCboePB9XaHlmFwnYNGHNopA9aVvJ8@z> "Ward Correll" writes: > Maybe a bug in Cygwin! I think that this sorce code is correct in the Final > ANSI\ISO standard on C++ so I think it could be cygwin. Please check it out > for me in this simple code. It's not a bug. Please see the discussion on pointer to member function in a recent C++ book such as Stroustrup 3rd edition. Of course, the best place is the ISO standard itself (cf: 8.3.3 [dcl.mptr]/2), but that can be rather obtuse. It's also a good idea to report what version of compiler you're using and some system/OS info (gcc -v reports the compiler version). > case 1: pFunc = Mammal::Speak; break; > default: pFunc = Mammal::Move; break; ^^^^^^ > 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. > Anyway to force compiling? The compiler gave you the answer, so use it! (hint: Mammal::Speak --> &Mammal::Speak). Followup to a C++ forum please. Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com