finding offset of a member in C structures

Sean Eric Fagan sef at kithrup.COM
Wed May 29 12:17:32 AEST 1991


In article <1991May25.054608.6647 at cunixf.cc.columbia.edu> dmj at cunixa.cc.columbia.edu (Douglas M Jaffe) writes:
>i have to check my ansi reference for offsetof().  however, i wouldn't
>rely on the assumption that offsetof() will exist in every 
>__STDC__ (stupid c) compiler that you encounter.  

I would, since it's part of ANSI, and I'd rely on it as much as I would
vfprintf.

Grab your nearest ANSI C document, and look at what's in <stddef.h>

-- 
Sean Eric Fagan  | "I made the universe, but please don't blame me for it;
sef at kithrup.COM  |  I had a bellyache at the time."
-----------------+           -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.



More information about the Comp.lang.c mailing list