On Thu, Sep 9, 2010 at 12:17 PM, ram das <ramnaraya...@gmail.com> wrote:

> thanks this seems fine.
>
>
> On Wed, Sep 8, 2010 at 1:02 AM, albert theboss <alberttheb...@gmail.com>wrote:
>
>>
>> typedef struct list node;
>>
>> node a;
>>
>> (float*)((char*)a+2)
>>
>
you have use 2 as a hardcoded size of integer

are you looking for following

struct a {
          int a ;
          float b;
} a ;

void *ptr = &a;

so to access b you should write

(unsigned long) ptr + (unsigned long)  & ((struct a *) 0 -> b);


>
>> is it correct ??
>> correct me i am wrong....
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algoge...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Thanks & Regards
> Ram Narayan Das
> mob: +91 9177711195
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards,
Rahul Patil

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to