I have this code:
CCalcArchive::CCalcArchive() : m_calcMap()
{
}
m_calcMap
is defined as this:
typedef CTypedPtrMap<CMapStringToPtr, CString, CCalculation*> CCalcMap;
CCalcMap& m_calcMap;
When I compile in Visual Studio 2008, I get this error:
error C2440: 'initializing' : cannot convert from 'int' to 'CCalcArchive::CCalcMap &'
I don't even understand where it gets the "int" error from, and also why this doesn't work? It feels like I'm actually having some sort of syntax error, but isn't this how member initialization lists are supposed to be used? Also, AFAIK, the MFC class CTypedPtrMap
has no constructor taking arguments.