Probably input
in your first example is a CString
instance, and there is an overload of operator==
taking a raw C-style string pointer and a CString
(const CString&
), that does the right thing of string comparison.
In fact, in cstringt.h
ATL header file, you can find:
friend bool operator==( _In_z_ PCXSTR psz1, _In_ const CStringT& str2) throw() { return( str2.Compare( psz1 ) == 0 ); }