problem.please help

Discussion in 'C' started by singh_r85, May 31, 2010.

  1. singh_r85

    singh_r85 New Member

    Joined:
    May 25, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    0
    I can't seem to define a linked list node which contains a
    pointer to itself.
     
  2. pkbis28

    pkbis28 New Member

    Joined:
    May 25, 2010
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    Structures in C can certainly contain pointers to themselves;
    the discussion and example in section 6.5 of K&R make this
    clear. Problems arise if an attempt is made to define (and use)
    a typedef in the midst of such a declaration; avoid this.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice