24 January 2006
Learn a new trick with the offsetof() macro
by YukuanMarkAlmost never used, the offsetof() macro can actually be a helpful addition to your bag of tricks. Here are a couple of places in embedded systems where the macro is indispensable—packing data structures and describing how EEPROM data are stored.
20 December 2005
Jserv's blog: C99 的 offsetof macro
by YukuanMark歷久彌新的 C 語言在 1999 年時,ANSI/ISO 批准之前的 C90 Draft,成為新標準,也稱為 C99,offsetof 是個其中制定的新 macro,在規格中提到:
1
(2 marks)