Clear Function on Linked List

This is a discussion on Clear Function on Linked List within the C++ Programming forums, part of the General Programming Boards category; hey, im doing this linked list program, and i got everything to work right except for my clear list function. ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    18

    Clear Function on Linked List

    hey, im doing this linked list program, and i got everything to work right except for my clear list function. When i insert something into the list, and then i select the item in the menu to clear the list, it clears it. But then afterwards, if i want to insert something back into the list or view the entire list, my program crashes and i get an Exception Handling error. Please help. the site that my program is on is posted below, and the Clear() function is on line 00260: youll know what i mean when you go to the site. PS. to contact me in person, email me at DRFUNKENSTINE@aol.com

    http://sourcepost.sytes.net/source/s...source_id=1712

  2. #2
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680
    Try: head = NULL at the end of your Clear function.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sorting linked list please help with CODE
    By scarlet00014 in forum C Programming
    Replies: 3
    Last Post: 09-27-2008, 11:24 PM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  3. linked list recursive function spaghetti
    By ... in forum C++ Programming
    Replies: 4
    Last Post: 09-02-2003, 02:53 PM
  4. Linked List
    By jpipitone in forum C Programming
    Replies: 4
    Last Post: 03-30-2003, 08:27 PM
  5. Linked list with two class types within template.
    By SilasP in forum C++ Programming
    Replies: 3
    Last Post: 02-09-2002, 05:13 AM

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