ha ha, j/k i know everyone hates that!!!
but....this is a homework related question i posted a week or so ago and have been having a lot of trouble w/this, this is what i have so far w/the help that i've got...PLEASE!!! do NOT do this for me, i dont want that, i know i have to know this stuff and really want genuine help, if youre just gunna tell me to do it myself then just dont post.
im supposed to use these data structures and the function prototype given to me to create a linked list, this is what i have so far, i've looked at the tutorials n' stuff but im needing more help....i dont understand how im supposed to get things working, i know i'll have to parse through the string passed to me but other than that, the **headPP thing is really getting me? how do i get this linked list in motion
Code:/*************DATA STRUCTURES******************/ // Encapsulates each entry in the phone book struct PhoneEntry { // null-terminated string representing student name char *name; // null-terminated array representing student phone number // in the format: XXX-XXXX char number[9]; }; // Represents the structure of the phone book struct PhoneBook { PhoneEntry data; PhoneBook *next; }; /****************FUNCTIONS******************/ void BuildPhoneBook(PhoneBook **headPP, const char *str) { PhoneBook *conductor; const char array[1024] = str; int i; conductor = *headPP; if(conductor != NULL) { while(conductor->next != NULL) { conductor = conductor->next; } } if(array = str) { while(i != NULL) { array[i] = str; if(array[i] = ' ') { conductor->data.name = array } ++i; } } }
sorry this was so long