offsetof

Discussion in 'C++' started by Tony Johansson, Dec 16, 2004.

  1. 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
     
    Tony Johansson, Dec 16, 2004
    #1
    1. Advertising

  2. * 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?
     
    Alf P. Steinbach, Dec 16, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hiroki Horiuchi

    g++ "offsetof" problem

    Hiroki Horiuchi, Nov 25, 2003, in forum: C++
    Replies:
    5
    Views:
    6,629
    red floyd
    Nov 25, 2003
  2. Tony Johansson

    More offsetof

    Tony Johansson, Dec 16, 2004, in forum: C++
    Replies:
    3
    Views:
    520
    Mike Wahler
    Dec 18, 2004
  3. Exits Funnel

    Trouble with offsetof

    Exits Funnel, Jan 8, 2005, in forum: C++
    Replies:
    9
    Views:
    534
    Exits Funnel
    Jan 9, 2005
  4. Alejo

    offsetof

    Alejo, Jul 15, 2003, in forum: C Programming
    Replies:
    20
    Views:
    1,075
    Dan Pop
    Jul 22, 2003
  5. Arthur J. O'Dwyer

    Pre-offsetof() question

    Arthur J. O'Dwyer, Oct 6, 2003, in forum: C Programming
    Replies:
    6
    Views:
    415
    Arthur J. O'Dwyer
    Oct 7, 2003
Loading...

Share This Page