File Handleing
Is there a reference online where I can read up on file handleing? I am creating a address book and I want to save all my contacts to a dat file or something. I also want to be able to call up contacts to be viewed.
Thanks
Sounds like you only need a simple text-based file format => simple fprintf() / fscanf() should do quite well...
If you want an advanced solution, then think about using XML - there are some nice and easy to use parsers available (Xerxes for example)...
If you want an advanced solution, then think about using XML - there are some nice and easy to use parsers available (Xerxes for example)...
What language are you using? For C++, I recommend fstream(library). For output you would make an output object, like so: ofstream outdata//o in ofstream for ''output'' ** outdata can be anything!
outdata("file1.dat") //blah
Like so. Or for input:
ifstream indata//anything for indata acceptable
indata("file1.dat")
Although this way is my favorite, I''ve heard of other ways of file handling in C++.
What does it take to be a good game programmer?
---
Good insight,
good knowledge,
and of course,
big money deposits!
outdata("file1.dat") //blah
Like so. Or for input:
ifstream indata//anything for indata acceptable
indata("file1.dat")
Although this way is my favorite, I''ve heard of other ways of file handling in C++.
What does it take to be a good game programmer?
---
Good insight,
good knowledge,
and of course,
big money deposits!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement