Re: Basic C query.
Re: Basic C query.
- Subject: Re: Basic C query.
- From: Jens Alfke <email@hidden>
- Date: Wed, 23 Jun 2010 09:20:39 -0700
On Jun 23, 2010, at 7:53 AM, Arnab Ganguly wrote:
> int result = (((Test *) 8)->a) - 8;
You could fix this by adding an &:
int result = &(((Test *) 8)->a) - 8;
but this construct is so ugly and hard to understand that you really should use offsetof( ) instead.
—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden