title: How to read / write a struct in Binary Files?
body: <p>I am facing a small problem. I have a struct, which has a vector. Note that the vector is dynamic per every iteration. Now, in a particular iteration, how do I store the struct which contains a vector of size n to a binary file?</p>
  
  <p>Also, when retrieving, assume that I know how the size of the vector, how to I retrieve from the binary file, the struct variable containing the vector of all the stored elements?</p>
  
  <p>I am able to store something to the binary file (as I can see the size increasing when writing), but when I am trying to retrieve back the elements, I am getting size of vector to be zero.</p>
  
  <p><strong>Unfortunately, I have to achieve this using the standard STL and not use any third-party libraries.</strong></p>