title: What list class to use?
body: <p>I'd like to create a short lived list, over the life of a function, to collect a list of <code>CPoint</code> objects and then iterate over those objects. I'd like to use <code>CTypedPtrList</code> but I am not sure how to set it up to have it accept objects not derived from <code>CObject</code>; <code>CPoint</code> comes from a struct <code>tagPOINT</code>. </p>
  
  <p>Is it possible to use <code>CTypedPtrList</code> with <code>CPoint</code>?</p>
  
  <p>Otherwise, should I just use <code>std::list&lt;CPoint&gt;</code>? // I have started to use <code>std:list</code> and can successfully build a list, but I cannot find a way to iterate over the list. </p>
  
  <pre><code>std::list&lt;CPoint*&gt; pointList;
  // Add to the list with list.push_front(new CPoint(x, y));
  std::for_each(pointList.begin(), pointList.end(), [](pointList* cur)
  {
      TRACE("APoint: %f, %f\n", cur-&gt;x, cur-&gt;y);
  });
  </code></pre>
  
  <p>I have tried that, but I keep getting told that <code>for_each</code> is not a member of <code>std</code>. I tried to add <code>#include &lt;for_each&gt;</code> (as I had to do for <code>list</code>) but it still is not recognized. </p>
  
  <p>Any suggestions?</p>