title: Writing some data structure to file
body: <p>Imagine I have an object of class <code>Product</code>, which has member variables like: <code>price, name, etc.</code>.
  And say I have 10 such Product objects.
  Now I want to write all 10 of them say to some file <code>Products.dat</code>.
  Later I want to say retrieve 6th product from file.
  How is it achieved usually in C++? (I am merely interested
  in retrieving part).</p>