Connecting Tech Pros Worldwide Help | Site Map

(part 29) Han from China answers your C questions

  #1  
Old November 19th, 2008, 04:05 PM
George Orwell
Guest
 
Posts: n/a
What is this?

Eric said:
Quote:
What is this?
>
( char * ) &( ( struct aStruct * ) 0 )
That looks like either someone's poor coding or someone's poor
pasting for an implementation of offsetof() from stddef.h. The
(char *) leads me to think that there's plenty of missing context,
so post the surrounding code, and we'll be happy to jerk ourselves
off analyzing the code for you and telling you why it won't work on
the control system for your Tomahawk missile.

For what it's worth,

((size_t) &((TYPE *)0)->MEMBER)

is a common implementation of offsetof() on systems that allow it.

Yours,
Han from China

Il mittente di questo messaggio|The sender address of this
non corrisponde ad un utente |message is not related to a real
reale ma all'indirizzo fittizio|person but to a fake address of an
di un sistema anonimizzatore |anonymous system
Per maggiori informazioni |For more info
https://www.mixmaster.it

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: (part 33) Han from China answers your C questions Flash Gordon answers 5 November 22nd, 2008 12:35 AM
Re: (part 21) Han from China answers your C questions Lew Pitcher answers 35 November 21st, 2008 07:25 PM
(part 30) Han from China answers your C questions Borked Pseudo Mailed answers 16 November 20th, 2008 05:55 PM
(part 29) Han from China answers your C questions Nomen Nescio answers 2 November 20th, 2008 02:25 AM