Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!ukc!stl!concurrent!concurrent.co.uk!asc From: asc@concurrent.co.uk (Andy Chittenden) Newsgroups: comp.lang.c++ Subject: pointers to overloaded member functions Message-ID: <935@sl10c.concurrent.co.uk> Date: 6 Oct 89 11:20:59 GMT Sender: info@concurrent.co.uk Reply-To: asc@concurrent.co.uk (Andy Chittenden) Organization: Concurrent Computer Corp (ESDG), Slough, U.K. Lines: 35 I'm having difficulty with pointers to overloaded member functions. Can anybody help? The example below won't compile because I have an overloaded function. However, as I have defined two different function pointers with different parameters (f1 and f2 in my example) I would have thought that C++ would select the correct functions on the two lines flagged as errors below (afterall, when these functions are called directly C++ knows which one to call). By the way, I'm using v1.2 of cfront. // begin example class Object { public: Object(); void set_ChangeDate(); void set_ChangeDate(const long); }; typedef void (Object::*f1)(); typedef void (Object::*f2)(const long); f1 fred = &Object::set_ChangeDate; // C++ errors this f2 joe = &Object::set_ChangeDate; // and this Thanks in anticipation, Andy Chittenden ---------------------------------------------------------------------- ___________ / _________/_ | DOMAIN: asc@concurrent.co.uk /_/________/ / | UUCP: ...!uunet!ukc!concurrent!asc Concurrent/__________/ | Royal Mail: 227 Bath Road Computer Corporation | Slough SL1 4AX, England