Subj : A linked list error - SL To : borland.public.cpp.borlandcpp From : Saurabh Lahoti Date : Wed Aug 25 2004 07:42 am I was creating a linked list class and was using the function shown below for insertion: //Node constructor: Node::Node (Node *newNext, Node *newPrev, VALTYPE newVal) : next(newNext), prev(newPrev), val(newVal) {} // Front insertion function: void LinkedList::insertFront (VALTYPE toInsert) { if (size == 0) { start = new Node (NULL, NULL, toInsert); end = itr = start; } Node *temp = new Node (start, NULL, toInsert); start -> prev = temp; start = temp; if (size == 0) { itr = end = start; } size++; } //Back insertion function: void LinkedList::insertBack (VALTYPE toInsert) { if (size == 0) { insertFront (toInsert); } else { end -> next = new Node (NULL, end, toInsert); end = end -> next; size++; } } ....When I now try to manipulate the list, after insertion, an EAccess exception is thrown every which way. If I try to obtain a node's value, or its next pointer this exception is thrown. I can't even check whether a node is NULL or not ... it simply won't let me access the list ! I have never encountered this error before and have double-checked the code. This is very confusing. .