0
如何將CString轉換爲MFC中的枚舉類型(VC++)?在MFC(VC++)中將CString轉換爲枚舉類型?
我有一個方法,它將輸入參數作爲枚舉,但我傳遞Cstring值到它,我可以如何將其轉換爲枚舉。
CString strFolderType = strFolderType.Right(strFolderType.GetLength()-(fPos+1));
m_strFolderType = strFolderType ;
我有一個方法
ProtocolIdentifier(eFolderType iFolderType)
where enum eFolderType
{
eFTP = 1,
eCIFS,
eBOTH
};
now when i am calling like this :
ProtocolIdentifier(m_strFolderType);
It says cannot convert CString to eFolderType ...
How to resolve this ?