phone - * with the phonelist. */ void...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/* *FILE: phone.h *DESCRIPTION: This file contains function prototypes * for functions for the phonelist linked * list. */ typedef char string[60]; typedef struct _data { string name; long number; } data; typedef struct _phonelist* phonelist; struct _phonelist { struct _data person; phonelist link; }; /* Function: prepend * Description: adds an item at the beginning of the list) */ void prepend(phonelist *list, data person); /* Function: printList * Usage: printList(list); * Description: display the items in the phone list. */ void printList(phonelist list); /* Function createPhoneList * Usage: list = createList(); * Description: This function creates an instane of a * phone list. */ phonelist createPhoneList(); /* Function: destroyPhoneList * Usage: destroyPhoneList(&list); * Description: This function deallocates memory associated
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: * with the phonelist. */ void destroyPhoneList(phonelist *list); /* Function: append * Usage: append(&list, person); * Description: This function adds the new data * item at the end of the list. */ void append (phonelist* list, data person); /* Function: copyList * Usage: copyList(oldlist,&newlist); * Description: This function duplicates the contents of * oldlist in newlist: When the function * returns both lists have identical contents * and in the same order. (copy constructor) */ void copyList (phonelist oldlist, phonelist *newlist); /* Function: reverseList * Usage: reverseList(&list); * Description: This function, as its name suggests, reverses * the contents of a list. */ void reverseList(phonelist* list);...
View Full Document

This note was uploaded on 01/17/2012 for the course CSC 1254 taught by Professor Blanks,l during the Fall '08 term at LSU.

Page1 / 2

phone - * with the phonelist. */ void...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online