I think the question should have been quite generic, if it is integer you
can go from the void pointer to four bytes ( sizeof(int)) ahead and get the
next number that is what is required for us. But what if we do not know what
is the member type is ?, How we can get the second member if the first
m
can you explain?thanks in advance
--
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
It is giving me error."invalid cast from type ‘main()::node’
to type ‘char*"
--
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 t
On Thu, Sep 9, 2010 at 12:17 PM, ram das wrote:
> thanks this seems fine.
>
>
> On Wed, Sep 8, 2010 at 1:02 AM, albert theboss 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
struc
thanks this seems fine.
On Wed, Sep 8, 2010 at 1:02 AM, albert theboss wrote:
>
> typedef struct list node;
>
> node a;
>
> (float*)((char*)a+2)
>
> is it correct ??
> correct me i am wrong
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks"
what if there are more than two elements?
On Wed, Sep 8, 2010 at 10:00 PM, subramani s wrote:
> struct list node;
> a=(float *)((char *)a+sizeof(node)-4);
>
> correct me if i am wrong
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
>
struct list node;
a=(float *)((char *)a+sizeof(node)-4);
correct me if 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
typedef struct list node;
node a;
(float*)((char*)a+2)
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 gro
u didn't give any name for the structure so it'll give error.correct
me if 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