title: How do you save objects with variable length members to a binary file usefully?
body: <p>I'm working with c++ and I am writing a budget program (I'm aware many are available--it's just a learning project). </p>
  
  <p>I want to save what I call a book object that contains other objects such as 'pages'. Pages also contain cashflows and entries. The issue is that there can be any amount of entries or cashflows. </p>
  
  <p>I have found a lot of information on saving data to text files but that is not what I want to do.</p>
  
  <p>I have tried looking into using the boost library as I've been told serialization might be the solution to this problem. I'm not entirely sure which functions is boost are going to help or even what the proper ways are to use boost. </p>
  
  <p>Most examples of binary files that I have seen are with objects that have fixed size members. For example, a point might contain an x value and a y value that are both doubles. This will always be the case so it is simple to just use sizeOf(Point). </p>
  
  <p>So, I'm either looking for direct answers to this question or useful links to information on how to solve my problem. But please make sure you links are specific to the question.</p>
  
  <p>I've also posted the same question on <a href="http://www.cplusplus.com/forum/beginner/71679/" rel="nofollow">cplusplus</a></p>