Apr 102008

Ever felt the need to dump an MFC array content to a debugger, it’s just so easy! Use AfxDump or afxDump!

Here is an e.g.

CArray IntArray;
AfxDump( &IntArray ); // Or

#ifdef _DEBUG
afxDump << IntArray; #endif[/sourcecode]

Jun 272007

This is how we forward declare a template class…

// Forward declare CArray template class
template< class TYPE, class ARG_TYPE> class CArray;

class SomeClass
      // No need for "afxtempl.h"
      CArray<float ,float>* m_pFloatArray;