Thread: Help I'm dying linked structures

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    7

    Help I'm dying linked structures

    thanks
    Last edited by Dorky King; 05-30-2007 at 11:21 AM. Reason: problem solved

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Well, for one thing...
    Code:
    	if (header->next == NULL){
    		header = (list_type*)malloc(sizeof(list_type));
    ...you just lost your old header.
    If you understand what you're doing, you're not learning anything.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Quote Originally Posted by msdn
    Linker Tools Error LNK1120

    number unresolved externals

    Error LNK1120 gives you a count (number) of unresolved externals for this link. The conditions that cause unresolved externals are described with error LNK2001, which precedes this error message (once for each unresolved external).
    Usually means one of the following.
    - You didn't implement the function
    - You didn't spell it right, or get the case right ( foo != Foo for example)
    - For C++, the parameters don't match.

    > new = (list_type *) malloc ( sizeof (list_type) );
    See the FAQ on casting (or rather, not casting) malloc in C.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Structure of structures + linked list
    By saeculum in forum C Programming
    Replies: 3
    Last Post: 03-06-2009, 08:02 PM
  2. Replies: 8
    Last Post: 12-05-2008, 02:18 AM
  3. C Linked Lists and Structures help!
    By Yorae in forum C Programming
    Replies: 0
    Last Post: 03-07-2006, 09:55 AM
  4. Can i do this: Structures and linked lists help
    By satory in forum C Programming
    Replies: 4
    Last Post: 04-25-2005, 07:49 AM
  5. writing linked structures
    By chrismiceli in forum C Programming
    Replies: 12
    Last Post: 07-06-2003, 01:14 AM