I'm working on a small phone book program. When a new entry is added to the phone book old entries should reorder themselves in the array alphabetically. For example, if the array contains:
Anna
Fred
Jeff
and I'm trying to add Bob, Fred and Jeff should be pushed down. I was thinking of using strncmp() to determine the numerical value of each entry. But I'm not sure where I'd go beyond there.
PS. The same thing should happen when an entry is deleted from the phone book.
Thanks in advance![]()



LinkBack URL
About LinkBacks





I used to be an adventurer like you... then I took an arrow to the knee.