From: horst DOT kraemer AT snafu DOT de (Horst Kraemer) Newsgroups: comp.os.msdos.djgpp Subject: Re: Gcc bug? Date: Fri, 25 Sep 1998 06:13:16 GMT Organization: [Posted via] Interactive Networx Lines: 43 Message-ID: <360a822a.21933698@news.snafu.de> References: <6udiuh$f9p$1 AT inf6serv DOT rug DOT ac DOT be> NNTP-Posting-Host: n33-168.berlin.snafu.de To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On 24 Sep 1998 13:54:25 GMT, jfvschra AT eduserv1 DOT rug DOT ac DOT be (Johan Verschraegen) wrote: >[...] >When i tried to compile to program with gcc under Unix i got no errors and >the program worked fine. Please help me with how to solve this. This is probably an older version which is not yet compliant to the new C++ standard. >//begin of the program >#include >class Test >{ > int testint; > void (Test::*PrintPtr)(); > public: > Test(int in_testint) > { > testint=in_testint; > } > void SetMode(int mode) > { > if(mode==0) PrintPtr=PrintMode0; <-(1)first warning if(mode==0) PrintPtr=&PrintMode0; > if(mode==1) PrintPtr=PrintMode1; <-(2)second warning if(mode==1) PrintPtr=&PrintMode1; > void Print() > { > PrintPtr(); <-(3) here i get the error (this->*PrintPtr)(); Regards Horst