title: Printing out contents of a list from the c++ list library
body: <p>I wanted to print out the contents of a list for a simple program I'm writing. I'm using the built in list library </p>
  
  <pre><code>#include &lt;list&gt;
  </code></pre>
  
  <p>however, I've no idea how to print out the contents of this list in order to test/check the data within. How do I do this?</p>