Thanks Keith, that was the problem.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Keith
Rollin
Sent: 25 November 2002 08:09
To: Palm Developer Forum
Subject: RE: Operator overload compiler problem


In that case, why do you have both s1 and s2 in there?  You only need
one of them.  The other object ("*this") is implicit.

-- Keith Rollin
-- Palm OS Emulator engineer


At 8:02 AM +0000 11/25/02, Roger Womack wrote:
>The line that doesn't compile is actually in the class declaration ie :-
>class CFoo
>{
>public:
>       CFoo() {};
>       bool operator != (const CFoo& s1, const CFoo& s2);
>};
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]On Behalf Of Mark
>Wilden
>Sent: 24 November 2002 23:15
>To: Palm Developer Forum
>Subject: Re: Operator overload compiler problem
>
>
>From: "Roger Womack" <[EMAIL PROTECTED]>
>
>>  bool operator != (const CFoo& s1, const CFoo& s2);
>>
>>  but the compiler gives the following :-
>>
>>  Error   : illegal 'operator' declaration
>>  stdafx.h line 50    bool operator != (const CFoo& s1, const CFoo& s2);
>
>Looks like CFoo hasn't been declared. Try
>
>   class CFoo;
>   bool operator != (const CFoo& s1, const CFoo& s2);

--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to