Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c++ Subject: Re: assign string to chr* Date: Mon, 08 Aug 2011 07:39:01 +1200 Lines: 19 Message-ID: <9a87ulFef9U1@mid.individual.net> References: <234c1699-d7b4-4f35-930b-ae6a1790d6ec@glegroupsg2000goo.googlegroups.com> <99jf95F194U1@mid.individual.net> <19cd6be0-459a-4c4e-bdc6-dd13751ec722@fq4g2000vbb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 0gJuszbFtn25fqCiYmasIQS5JVplswwRXmcLtk/Qe31Uq72NpA Cancel-Lock: sha1:q2935YvQSsbmtrc493mBH+maTCg= User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.9) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4 In-Reply-To: <19cd6be0-459a-4c4e-bdc6-dd13751ec722@fq4g2000vbb.googlegroups.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.c++:8555 On 08/ 8/11 05:30 AM, James Kanze wrote: > On Jul 30, 11:35 pm, Ian Collins wrote: >> On 07/31/11 10:11 AM, Sasha Daje wrote: > >> Context? > >>> test = (char*)"BLABLA"; > >> No you don't want to do that if test is a char*. > > It depends on where test is defined. I've recently written a > lot of code full of const_cast. I had to interface with > a third party library written in C, which didn't use const (or > only rarely used const). But you didn't do that with string literals, did you? -- Ian Collins