Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!microsoft!peterwu From: peterwu@microsoft.UUCP (Peter Wu ) Newsgroups: comp.lang.c Subject: sizeof a struc field Keywords: sizeof Message-ID: <7710@microsoft.UUCP> Date: 15 Sep 89 18:39:08 GMT Distribution: usa Lines: 16 What's the simplest way to obtain the sizeof a field inside a struc without declaring a variable? E.g: struct abc { int def; char ghi; long jkl; }; I know this works: #define SIZEGHI sizeof(((struct abc *)0)->ghi) Is there a shorter way?