How to get the number of elements in a struct?
<p>I declared a struct for some options that shall be filled by command line arguments or by reading an input file:</p>

<pre><code>struct options {
  int val1;
  int val2;
  bool val3;
}
</code></pre>

<p>Now I want to check for the correct number of arguments at execution of the program. Sure thing a </p>

<pre><code>const int optionsSize = 3;
</code></pre>

<p>would do. But is there any adaptive way? What if I add another value into the struct and don't remember to increase the integer?</p>
