Forward declaring a template class!

This is how we forward declare a template class… [sourcecode language=’cpp’]// Forward declare CArray template class template< class TYPE, class ARG_TYPE> class CArray; class SomeClass { public: // No need for “afxtempl.h”       CArray* m_pFloatArray; };[/sourcecode]
Continue reading…

 

Using GetLogicalDriveStrings!

I’ve seen people getting stuck with this API mainly because each drive given in the output buffer from this API is NULL terminated and the last entry is double NULL terminated. So how to extract drives from this API’s output buffer. Here is the code snippet that does this… [sourcecode language=’cpp’]TCHAR szDrives[MAX_PATH] = { 0 […]
Continue reading…