title: Reading binary file defined by a struct
body: <p>Could somebody point me in the right direction of how I could read a binary file that is defined by a C struct?
  It has a few #define inside of the struct, which makes me thing that it will complicate things.<br>
  The structure looks something like this: (although its larger and more complicated than this)</p>
  
  <pre><code>struct Format {
      unsigned long str_totalstrings;
      unsigned long str_name;
      #define STR_ORDERED 0x2
      #define STR_ROT13 0x4
      unsigned char stuff[4];
      #define str_delimiter stuff[0]
  }
  </code></pre>
  
  <p>I would really appreciate it if somebody could point me in the right direction on how to do this. Or if theres any tutorial out there that covers this topic?</p>
  
  <p>Thanks a lot in advance for your help.</p>