Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > offsetof

Reply
Thread Tools

offsetof

 
 
Tony Johansson
Guest
Posts: n/a
 
      12-16-2004
Hello!

Hur kan denna formulering ge differensen i byte mellan s_type och m?

#define offsetof(s_type, m) ((size_t) &(((s_type *) 0) ->m))


//Tony



 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      12-16-2004
* Tony Johansson:
>


Remember the thing about HOMEWORK questions, "Tony"?

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with offsetof Exits Funnel C++ 9 01-09-2005 11:19 PM
More offsetof Tony Johansson C++ 3 12-18-2004 12:59 AM
g++ "offsetof" problem Hiroki Horiuchi C++ 5 11-25-2003 05:01 PM
Pre-offsetof() question Arthur J. O'Dwyer C Programming 6 10-07-2003 04:53 AM
offsetof Alejo C Programming 20 07-22-2003 03:39 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57