sorting of a linked l 
Author Message
 sorting of a linked l


Quote:

>when allocating new list nodes, I always use calloc() to insure all
>fields (including the "next" field) are initialized to 0 (NULL).

Then you are writing implementation-dependent code.  calloc() sets the
region to all bits zero, and there is no guarantee that the
representation of null pointers (or of 0.0f or 0.0l) is all bits zero.
If you depend on such a representation, you are writing dangerous code.

--

* Chicago, IL (USA)    



Thu, 30 Jul 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. basic sort for singly linked list...

2. sorting of a linked list

3. insertion sort algorithm on linked list?

4. Sorting a double linked list

5. Generic sort routine for linked lists

6. : Insertion sort with doubly linked lists

7. sorting a double link list

8. Link-list sort algorithm question

9. deleting and sorting items in a linked list

10. Linked List Sort/Search/delete code ??Help????

11. Linked list sorting...

12. quick-sorting a linked list?

 

 
Powered by phpBB® Forum Software