🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3764

Re: What happens when ...

#3764
From: Michel Leunen
Date: Sun, 07 May 2006 09:03
21 lines
1671 bytes
Alan Bellingham wrote:

> It's more that it's silently converted to 
> 
>   char* ptr = const_cast<char*>("XXX");
> 
> as can be seen by the fact that you can assign through ptr. If you *do*
> assign through ptr, then you're screwed, because you'll either get an
> access violation, or a very difficult to find bug. But the compiler
> won't stop you.

Thanks for the correction. It was important.

Michel
-- 
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------
Technical Details
Message-ID: <445db726$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!ndsoftware.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <445cbd5d$1@newsgroups.borland.com> <445cd44f$1@newsgroups.borland.com> <2sqp5250pk9jl07ti0p95fg62v3m4n22g7@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2f21d80b956d055f
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Sun, 07 May 2006 11:03:03 +0200
From: Michel Leunen <nospam@noreply.please>
Organization: www.leunen.com
User-Agent: Thunderbird 1.5.0.2 (Windows/20060308)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: What happens when ...
References: <445cbd5d$1@newsgroups.borland.com> <445cd44f$1@newsgroups.borland.com> <2sqp5250pk9jl07ti0p95fg62v3m4n22g7@4ax.com>
In-Reply-To: <2sqp5250pk9jl07ti0p95fg62v3m4n22g7@4ax.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.247.79.30
Message-ID: <445db726$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1146992422 81.247.79.30 (7 May 2006 02:00:22 -0700)
Lines: 21
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!ndsoftware.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail