ISO C++ forbids cast to non-reference type used as lvalue ?
Steven Scholz
steven.scholz@imc-berlin.de
Tue Jul 12 07:13:00 GMT 2005
Daniel Kegel wrote:
> Steven Scholz wrote:
>
>>>> ISO C++ forbids cast to non-reference type used as lvalue
>>>>
>>>> for lines like
>>>>
>>>> (DWORD *) pbData += 1;
>>
>>
>> Thanks for your super fast reply. Any chance you could give me a
>> little hint how to fix the above line according to ISO C++?
>
>
> Oh, c'mon. It's just simple C pointers. (Oh, wait,
> maybe they're not simple to everybody :-)
;-)
I've not wrotten that code.
> What type is pbData? If it's char *, you can do
> pbData += sizeof(DWORD);
BYTE *pbData; (and BYTE is typedef unsigned char)
--
Steven
>
--
Steven Scholz
imc Measurement & Control imc Meßsysteme GmbH
Voltastr. 5 Voltastr. 5
13355 Berlin 13355 Berlin
Germany Deutschland
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list