Article View: comp.sys.mac.programmer.codewarrior
Article #1437Re: CWP6: illegal implicit conversion...
From: Ronald Webster
Date: Fri, 22 Sep 2000 06:14
Date: Fri, 22 Sep 2000 06:14
71 lines
2641 bytes
2641 bytes
Hmm... It looks like I spoke too soon. Here's a bit of code that compiles just fine in CWPro 5.3. Did something
all of a sudden change in CW6?
-Ron Webster
class zurk
{
public:
zurk(int z) {zonk=z;}
int zonk;
};
int Fref(zurk& z);
int Fcref(const zurk& z);
int Fval(zurk z);
int Fcval(const zurk z);
int Fref(zurk& z)
{
return(z.zonk);
}
int Fcref(const zurk& z)
{
return(z.zonk);
}
int Fval(zurk z)
{
return(z.zonk);
}
int Fcval(const zurk z)
{
return(z.zonk);
}
int main()
{
zurk zk(2);
int z;
z=Fref(zk); z=Fcref(zk); z=Fval(zk); z=Fcval(zk);
z=Fref(zurk(2)); z=Fcref(zurk(2)); z=Fval(zurk(2)); z=Fcval(zurk(2));
return 0;
}
meeroh wrote:
> In article <39CA6ACD.31F060CF@mindspring.com>, got@mindspring.com
> wrote:
>
> >Hello Again!
> >
> >First of all...thanks meeroh and Ronald for the updates. For some
> >reason I thought that doing this...
> >
> >> OnDraw( CP_Region(fPlatformWindow->visRgn) );
> >
> >...was still supplying an instance of CP_Region (like an anonymous one
> >or something!)
>
> It does, and that instance is always non-modifiable, i.e. const.
> Therefore, it can't be passed to a function that would modify it. That's
> all there is :-)
>
> meeroh
> --
> To get random signatures put text files into a folder called "Random Signatures" into your Preferences folder.
Technical Details
Message-ID:
<39CAF8B8.8A567B6C@optonline.net>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!cyclone2.usenetserver.com!news-out.usenetserver.com!news01.optonline.net!news02.optonline.net.POSTED!not-for-mailReferences:
<39CA60B0.DC1700A2@mindspring.com> <39CA6ACD.31F060CF@mindspring.com> <macdev-649CBD.23265021092000@news.mit.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bcce,4a0d644260b480cb X-Google-Attributes: gid10bcce,public X-Google-Thread: f635e,4a0d644260b480cb X-Google-Attributes: gidf635e,public X-Google-ArrivalTime: 2000-09-21 23:14:13 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!cyclone2.usenetserver.com!news-out.usenetserver.com!news01.optonline.net!news02.optonline.net.POSTED!not-for-mail Message-ID: <39CAF8B8.8A567B6C@optonline.net> From: Ronald Webster <ronw@optonline.net> Reply-To: ronw@optonline.net X-Mailer: Mozilla 4.75 (Macintosh; U; PPC) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac Subject: Re: CWP6: illegal implicit conversion... References: <39CA60B0.DC1700A2@mindspring.com> <39CA6ACD.31F060CF@mindspring.com> <macdev-649CBD.23265021092000@news.mit.edu> Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353" Content-Transfer-Encoding: 7bit Lines: 72 Date: Fri, 22 Sep 2000 06:14:13 GMT NNTP-Posting-Host: 24.188.225.14 X-Trace: news02.optonline.net 969603253 24.188.225.14 (Fri, 22 Sep 2000 02:14:13 EDT) NNTP-Posting-Date: Fri, 22 Sep 2000 02:14:13 EDT Organization: Optimum Online