Thread: linked list general question

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    65

    linked list general question

    lets say i have a linked list with only one value at head
    if i say

    Code:
    node *head=(first input)
    *pointerb=head;
    pointer->next=(new input)
    then if i say
    Code:
     head->next=....
     will it point to the new input?

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Well I guess that depends on what "..." is and what "it" refers to.
    If you understand what you're doing, you're not learning anything.

  3. #3
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    I have no idea what "pointerb" or "pointer" point to.
    Don't muck us about with attempts to make tiny code snippets that you think demonstrate everything relevant, which actually don't.

    Real code please!
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 05-31-2011, 11:34 AM
  2. linked list question
    By mikeman in forum C Programming
    Replies: 1
    Last Post: 11-30-2008, 01:56 PM
  3. Linked list question.
    By gp364481 in forum C Programming
    Replies: 2
    Last Post: 09-30-2008, 10:46 AM
  4. Linked List question
    By Karpaty in forum C Programming
    Replies: 3
    Last Post: 01-08-2008, 01:54 PM
  5. Linked list question
    By heygirls_uk in forum C Programming
    Replies: 4
    Last Post: 01-12-2004, 06:51 AM