My program is supposed to sort a doubly linked link alphabetically, and each node contains a single word string, my program crashes when it gets this far, whats missing??
void List::sortAlpha(){
Node * temp;
temp=start;
while(temp!=NULL){
string a=temp->word;
string b=temp->next->word;
string c;
if(a[0]<b[0]){
c = a;
a = b;
b = c;
}
else{
c = b;
b = a;
a = c;
}
temp=temp->next;
}
}