Re: real world sizeof bugs

Discussion in 'C Programming' started by Virchanza, Aug 30, 2011.

  1. Virchanza

    Virchanza Guest

    On Aug 24, 6:29 pm, William Ahern <will...@wilbur.25thandClement.com>
    wrote:

    >         struct nameinfo_query niquery;
    >
    >         memcpy(&niquery->addr.addr4, addr, sizeof(addr));



    Back in my day we only used the -> operator on pointers.
     
    Virchanza, Aug 30, 2011
    #1
    1. Advertising

  2. Virchanza <> writes:

    > On Aug 24, 6:29 pm, William Ahern <will...@wilbur.25thandClement.com>
    > wrote:
    >
    >>         struct nameinfo_query niquery;
    >>
    >>         memcpy(&niquery->addr.addr4, addr, sizeof(addr));

    >
    > Back in my day we only used the -> operator on pointers.


    Ah, youth! Back in *my* day we also used -> on integers. And the name
    after the . or -> could be a member of *any* struct type.

    --
    Ben.
     
    Ben Bacarisse, Aug 30, 2011
    #2
    1. Advertising

  3. Ben Bacarisse <> writes:
    > Virchanza <> writes:
    >> On Aug 24, 6:29 pm, William Ahern <will...@wilbur.25thandClement.com>
    >> wrote:
    >>
    >>>         struct nameinfo_query niquery;
    >>>
    >>>         memcpy(&niquery->addr.addr4, addr, sizeof(addr));

    >>
    >> Back in my day we only used the -> operator on pointers.

    >
    > Ah, youth! Back in *my* day we also used -> on integers. And the name
    > after the . or -> could be a member of *any* struct type.


    Oh, you had *types*!

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Nokia
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
     
    Keith Thompson, Aug 30, 2011
    #3
    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. Derek
    Replies:
    7
    Views:
    24,395
    Ron Natalie
    Oct 14, 2004
  2. Trevor

    sizeof(str) or sizeof(str) - 1 ?

    Trevor, Apr 3, 2004, in forum: C Programming
    Replies:
    9
    Views:
    656
    CBFalconer
    Apr 10, 2004
  3. Vinu
    Replies:
    13
    Views:
    1,483
    Lawrence Kirby
    May 12, 2005
  4. Jens Gustedt

    Re: real world sizeof bugs

    Jens Gustedt, Aug 25, 2011, in forum: C Programming
    Replies:
    12
    Views:
    498
    Tim Rentsch
    Sep 4, 2011
  5. Josef 'Jupp' Schugt

    Still use 'ruby-bugs' for Ruby bugs?

    Josef 'Jupp' Schugt, Nov 4, 2004, in forum: Ruby
    Replies:
    2
    Views:
    175
    Tom Copeland
    Nov 4, 2004
Loading...

Share This Page