Hi all.
I'm trying to get the size of a variable in a struct by his relative
postion i.e.
///
#define offsetof(s,m) (size_t)&(((s *)0)->m)
struct ThePimp{
char rings[10];
char blings[20];
};
int sizeOfBling = sizeof( (*char)&ThePimp +
(char)offsetof(ThePimp,blings) );
///
(If I have any syntax mistakes please ignore)
You can easily predict that sizeOfBling will be 4... (sizeof(int*))
Is there any way to acomplish it?
Thanks
--
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
-- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line. Sorry.