Hi,
Straightforward question: how do I write an array of records (structs) to a file? And then how do I retrieve structs from a file (in a different program) to output them?
Thanks
Linette
Hi,
Straightforward question: how do I write an array of records (structs) to a file? And then how do I retrieve structs from a file (in a different program) to output them?
Thanks
Linette
straightforeward answer:
show some effort. your gonna learn jack otherwise....
You can use <stdio.h> and use FILE structs which have a bunch of functions such as fread and fwrite which are good for writing data in binary mode.
You could also use fget* and fscanf to get text input
If you want to go OO then use <fstream> and ifstream's and ofstream's
http://www.cplusplus.com/ and http://www.cplusplus.com/ref/ are some good starting points for references
so is www.google.com
If you any questions on specifics of using them ask away