J
John Doe
Hi,
I am trying to replace the use of the Windows CString class by a
compatible one (CStdString) using std::string , the problem is I cannot
do the following thing :
A)
CString strFullPath;
CStdString& str = strFullPath;
or this :
B)
CStdString strFolder;
m_treeFolder.GetItemText(hItem, strFolder);
with GetItemText defined like this :
BOOL GetItemText(HTREEITEM hItem, CString& strText) const;
The question is in A) case when I assign a CStdString& with a CString
which operator is called, the assignment one, a cast ?
In B) same question should I declare a cast operator ? an assignement one ?
Final question what should I declare to make A) and B) possible ?
I am trying to replace the use of the Windows CString class by a
compatible one (CStdString) using std::string , the problem is I cannot
do the following thing :
A)
CString strFullPath;
CStdString& str = strFullPath;
or this :
B)
CStdString strFolder;
m_treeFolder.GetItemText(hItem, strFolder);
with GetItemText defined like this :
BOOL GetItemText(HTREEITEM hItem, CString& strText) const;
The question is in A) case when I assign a CStdString& with a CString
which operator is called, the assignment one, a cast ?
In B) same question should I declare a cast operator ? an assignement one ?
Final question what should I declare to make A) and B) possible ?