Help I'm dying linked structures

This is a discussion on Help I'm dying linked structures within the C Programming forums, part of the General Programming Boards category; thanks...

  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 12:21 PM. Reason: problem solved

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,175
    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
    32,823
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 08:49 AM
  5. writing linked structures
    By chrismiceli in forum C Programming
    Replies: 12
    Last Post: 07-06-2003, 02:14 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21