Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int getSizeOfAList(contact* head){
- contact* tmp = head;
- int size = 0;
- while(tmp != NULL){
- size++;
- tmp = tmp->next;
- }
- return size;
- }
- contact* listToArray(contact* head){
- int size = getSizeOfAList(head);
- contact* tmp = head;
- contact* contactArray = malloc(size * sizeof(contact));
- int i = 0;
- for(; i < size; i++, tmp = tmp->next)
- contactArray[i] = tmp;
- return contactArray;
- }
- void bsort_by_name(contact* contactArray, int size)
- {
- //bubble sort na tablicy
- //zaaktualizowanie listy kontaktow przy pomocy posortowanej tablicy
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement