Article View: borland.public.cppbuilder.upgrade
Article #58Re: BCB6 to BDS2006 problems with operators
From: Remy Lebeau (TeamB)
Date: Tue, 16 Oct 2007 16:56
Date: Tue, 16 Oct 2007 16:56
21 lines
1559 bytes
1559 bytes
"Roland" <neubert_nosp_@_nosp_wst.eu> wrote in message
news:470c83d5$1@newsgroups.borland.com...
> TMyClass& __fastcall operator=(TMyClass &p);
Get rid of the __fastcall convention and change the parameter to be 'const'
(which you should do anyway since you are not making any changes to it
inside the operator's body):
TMyClass& operator=(const TMyClass &p);
> return this;
You are trying to return a pointer where a reference is expected. You need
to dereference the pointer:
return *this;
Gambit
Technical Details
Message-ID:
<4714ed5c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<470c83d5$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10529a,d8a389c9012d5c15 X-Google-Attributes: gid10529a,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.upgrade References: <470c83d5$1@newsgroups.borland.com> Subject: Re: BCB6 to BDS2006 problems with operators Date: Tue, 16 Oct 2007 09:56:10 -0700 Lines: 23 Organization: Lebeau Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 207.178.157.90 Message-ID: <4714ed5c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1192553820 207.178.157.90 (16 Oct 2007 09:57:00 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail