Strange error (SOLVED)
I don't know if any of you have encountered anything such as this:
Basically, I have a normal class, but when I add...
...to it, I get a load of compile errors:
CMap<UINT8, UINT8, UINT8, UINT8> m_Ids;
Which is so weird. I don't understand why.
3>afxtempl.h(1334) : error C2248: 'CObject::CObject' :
cannot access private member declared in class 'CObject'
3> afx.h(551) : see declaration of 'CObject::CObject'
3> afx.h(522) : see declaration of 'CObject'
3> This diagnostic occurred in the compiler generated function
'CMap<KEY,ARG_KEY,VALUE,ARG_VALUE>::CMap(const CMap<KEY,ARG_KEY,VALUE,ARG_VALUE> &)'
The error occours in a compiler generated function to which there is no source, of course. I can comment out everything in the class, but it still won't work.
I can change the types, but it still won't work.
The only way I got it working is moving it to a different class.
The class it's inside is not derived from anything.
I find it weird, and I'm trying to hunt down the error. I'm guessing it's somehow related to its construction.
If anyone has an idea, then I'd appreciate it.
UPDATE: It's the copy constructor, as I suspected.
Causes the error.
//ERROR GetSetting(const CString& strKey, const CString& strName, CBuffer rBuffer, CBuffer rRetBuf = BufThrowError, CIndex::RegType* const pType = NULL) throw(...);
Guess I'll have to overload a copy constructor to take care of this.
But why oh why didn't the compiler point me to THAT LINE??????
Still working on the copy constructor, but having declared it is enough to remove the compile error.
So enjoy yourselves reading this.