Maybe anyone can explain this to me:
bool Func1(LPCTSTR sData)
{
if (sData) { ... }
}
And I called the function like this:
CString str = _T("");
Func1((str.IsEmpty() ? NULL : str));
And 'sData' inside function is never NULL, it is allways empty string but not NULL, why? Eddited code like this:
LPCTSTR strNull = NULL;
Func1((str.IsEmpty() ? strNull : str));
In this case it works correct.
Func1((str.IsEmpty() ? NULL : str));
doesn't compile on VS2015, I getError C2446 ':': no conversion from 'CString' to 'int' ...
– Latten