On Sun, Jul 27, 2008 at 7:09 PM, Saurabh Jain <[EMAIL PROTECTED]> wrote:
> --- In [email protected], Sebastian Bertran <[EMAIL PROTECTED]> wrote:
>>
>> On Sun, 2008-07-27 at 16:31 +0530, saurabh jain wrote:
>> > In the following line:
>> > "W64& mem = *(W64*)(W64)addr;"
>> >
>>
>> addr is W64 too? then the cast is unnecessary.
>
> Then why does the following code give a seg fault when I uncomment
> "//W64& mem = *(W64*)(W64)addr;"  ?
>
[...]
>  W64& mem = addr;

Because the first is treating addr as a pointer, and the second is
treating addr as a value.

Try

W64& mem = *addr;


-- 
PJH

'Two Dead in Baghdad' not  'product-friendly'  - Kent Ertugrul, chief
executive of Phorm.

http://shabbleland.myminicity.com/ind

Reply via email to