title: How do I get the number of members in a structure?
body: <p>I want to count the number of members in a structure.
  For example:</p>
  
  <pre><code>typedef struct
  {
      char    MrChar;
      int MrInt;
      long    MrLong;
  } Bg_Typedef;
  Bg_Typedef FooStr;
  </code></pre>
  
  <p>I create a function prototype that should return number of members in the structure</p>
  
  <pre><code>int NumberOfMem(Bg_Typedef *psStructure); 
  </code></pre>
  
  <p>=> NumberOfMem(&amp;FooStr) should return 3</p>