I have the following function prototype:
CString MyFunction(void) const
it returns the correct string i desire.
When i want to add the string to a listctrl i cast it the following
way:
lvi.pszText = (LPTSTR)(LPCTSTR)MyFunction;
when i do this, i get garbage characters (Ý to be exact)
However, i have another function prototype
const CString& MyFunction(void) const
which works correctly when i cast it. Any help?




Reply With Quote