View Single Post
Join Date: Aug 2005
Posts: 15,160
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1437
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: please help!! have some problems with my address book

 
0
  #4
Sep 8th, 2008
you need to use FILE*. On program startup, attempt to open the file for reading. If successful, then do what you mentioned. If not, then the file doesn't exist.

>>Which function i need to use? and how?
This is just normal file i/o stuff that should be explained in your textbook.

fopen() -- opens the file
fread() and fgets() -- reads the file
fwrite() -- writes the file
fseek() -- move file pointer around the file
fclose() -- close the file
Last edited by Ancient Dragon; Sep 8th, 2008 at 5:50 am.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote