title: How to print every member of a structure
body: <p>Suppose I have a structure with 50 integers. Is there a way to print out the value of every integer without having to manually type it out?</p>
  
  <p>Example:</p>
  
  <pre><code>struct foo
  {
    int one; //= 1
    int two; //= 2
    int three; //= 3
    ...
    int fifty; //= 50
  };
  int main()
  {
      foo bar;
      int dream;
      cout &lt;&lt; someThing(bar) //prints 12345...50
  }
  </code></pre>
  
  <p>edit:
  I realize data like this should be stored in an array, this is just a hypothetical question.
  I am just curious if something like this exists. </p>