Hi all.
As a part of my project I need to get the address book information saved in a .txt file into a Binary Search Tree.
The info in the address book is stored like the following:
First Name, Last Name, Date of Birth, E-mail, Phone, Address, City, Zipcode
So far I coded this:
do {
fgets(temp, 160, pFile);
sscanf(temp, "%s %s %s %s %s %s %s %s", newContact.first_name, newContact.last_name, newContact.date_of_birth, newContact.e_mail, newContact.phone, newContact.address, newContact.city, newContact.zipcode);
node = insert(newContact, node);
} while ( fgets(temp, 160, pFile) != NULL );
It's just the code to retrieve the information as you can see. The rest of the necessary codes are in their place. Since it's huge project I used lots of header files & I can't display all of it. But know that the file is ready to process. I just need to figure out this retrieve code.
Thanks a lot.