R
Rolf Magnus
Vincent said:class Folder
{
public:
friend class PimItemCollection;
Folder(OutlookSession* pOutlookSession);
virtual PimItemCollection* get_Items();
protected:
bool GetPOOMFolder();
OutlookSession* m_pOutlookSession;
OlDefaultFolders m_eFolderType;
IFolderPtr m_pIFolder;
PimItemCollection* m_pContactCol;
};
class ContactFolder : public Folder
{
public:
// Constructor/destructor
ContactFolder(OutlookSession* pOutlookSession);
~ContactFolder();
virtual ContactCollection* get_Items();
private:
};
I have ContactFolder deriving from Folder.
But when I compile I got the following error :
System.WindowsMobile.PocketOutlook.cpp(107) : error C2614:
'System::WindowsMobile:ocketOutlook::ContactFolder' : illegal member
initialization: 'm_eFolderType' is not a base or member
ContactFolder::ContactFolder(OutlookSession* pOutlookSession)
: Folder(pOutlookSession),
m_eFolderType( olFolderContacts )
{
}
Well, the compiler is correct. m_eFolderType is a member of Folder, and so
it can only be initialized in the initializer list of Folder's constructor.