title: Printing values of all fields in a C++ structure
body: <p>Consider a simple structure:</p>
  
  <pre><code>struct abc  
  {  
      int a;  
      char b;  
  }  
  </code></pre>
  
  <p>I got some value in a variable defined as its structure, and now I want to print the below.</p>
  
  <pre><code>*a = [some value]  
  b = [some character]*
  </code></pre>
  
  <p>What is the best way to achieve this for an arbitrary structure without having to write a dump...(...) function for each of the structure I encounter?</p>