But for void List::sort(const char* type) code, I can't figure out how I should handle the given codes to make it work so that in main function, it can be handled like list.sort(name); list.sort(ID); This is what I did do far to make this sort code.
Thank you for answer, it really helps me. But I have curiosity about how to change the position for Prev_Node and Next_Node, can you explain it for me? (example: head-Prev_Node-Next_Node-NULL -----> head-Next_Node-Prev_Node-NULL) and also the sort function gets constchar* type
for example for main function,