Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!ames!sun-barr!male!pitstop!texsun!pollux!ti-csl!mips!neath From: neath@solar-1.stars.flab.Fujitsu.JUNET Newsgroups: comp.lang.c++ Subject: Correction to Pointer/Reference to Members Message-ID: Date: 3 May 89 04:20:39 GMT Sender: news@ti-csl.csc.ti.com Distribution: comp.lang.c++ Organization: Texas Instruments Data Systems Group, Austin TX Lines: 26 Well, it seems that I tried to simplify my code example a little too much, resulting in a code fragment that is both wrong *AND* dosn't compile! Anyway, what I really meant to give as a code fragment is below :-) class A { int a; public: A(int n) {a = n;}; void print(); }; void A::print () { cout << a; }; typedef void A::MEMF; MEMF* p1 = A::print; // This is accepted by cfront MEMF& p2 = *A::print; // This results in bus error! At least now cfront will accept the first line commented as such! Regards Martin Neath ------------------------------------------------------------------------ DISCLAIMER: As always, the opinions expressed above are strictly my own and do not reflect those of my employer, Texas Instruments. ------------------------------------------------------------------------ -- Regards, Martin