怎么判断"中国人"里面包含"中国"解决立马送分!|

如何判断中国人里面包含中国?解决立马送分!|环境vc6[解决办法]CString::Findint Find( LPCTSTR lpszSu

如何判断"中国人"里面包含"中国"?解决立马送分!|
环境vc6

[解决办法]

CString::Find
int Find( LPCTSTR lpszSub ) const;

Return Value

The zero-based index of the first character in this CString object that matches the requested substring or characters; -1 if the substring or character is not found.

CStringstr1 = _T( "中国人 ");
CString str1 = _T( "中国 ");
if (str.Find(str1)> 0) 就包含 返回值等于 -1 不包含



[解决办法]
CString的Find()
[解决办法]
上面都说了方法了,以前做过,是对的
[解决办法]
find() != -1