title: 'CObject::CObject' : cannot access private member declared in class 'CObject'd:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxcoll.h
body: <p>This error happens while trying to send the instance of CTypedPointerList in the function parameter from one class to another class.</p>
  
  <p>How to solve this issue?</p>
  
  <p>Here is my code </p>
  
  <p>ObjectList.h</p>
  
  <pre><code>#pragma once
  #include "LogData.h"
  typedef  CTypedPtrArray&lt;CPtrList , CLog *&gt; CLogData;
  class CObjectList
  {
      public:
  
  CLogData m_logData;
      public:
  CObjectList();
  CLogData GetLog();
  };
  </code></pre>
  
  <p>ObjectList.cpp</p>
  
  <pre><code>#include "stdafx.h"
  #include "LogData.h"
  
  CObjectList::CObjectList()
  {
  }
  
  CLogData CObjectList::GetLog()
  {
  return m_logData;
  }
  </code></pre>
  
  <p>Regards,</p>
  
  <p>karthik</p>