I'm getting into c++ after having done a bunch of Java / PHP programming. I'm writing a budgeting program that has things like: pages (month of data), various money flows (with varying amounts of entries).
I've see a lot of information on writing to files using plain text. It is easy but also requires parsing and the data is plain to see.
I would like if possible to write files in binary mode. I haven't seen a lot on what the standard techniques for this are. Ex: what's best practice in regard to keeping the file well structured and manageable.
Obviously if it were just storing objects that have a few fixed data members of known length it's not too hard. However, I'm wondering with having many possible entries for Flows (stored as a vector of Flows) is the best idea to write something like: size of record, then the actual record. I'm just not sure what the industry standard is.
I know that mp3 tag files do this for their various fields as I wrote a program to parse them. Simply read the field size then copy that many bytes to memory. Is this the same approach I should use?