that sounds rite to me
... you are copying the address of the pointer, not the actual string
try thisand tell me what's get printedCode:while (current != NULL) {// keep looping till the end.... printf("%p %p %p %p\n, prev, current, temp, start); // <--- add this if ( strcmp(current->petName, prev->petName) <0) /* IF Androd is smaller than Dog == TRUE */ { prev->next = current->next; /* this is just saying Androd = Androd */ temp = prev; /* place "prev" i.e. Dog in a temporary variable */ prev = current; /* place current (Androd) to prev (Dog) so we have Androd, Dog // um, you are not using the temp? } else prev = current; // keep track of the previous item current = current->next; // move current after prev }



LinkBack URL
About LinkBacks
that sounds rite to me
... you are copying the address of the pointer, not the actual string 




