CString是MFC提供的字符串类你用如下两个函数做字符串比较cstr1.Compare("C++")==0cstr1.CompareNoCase("C++")==0
if(0==str.Compare(_T("C++")))