MyLib/MHashINI/MHash.hpp
@@ -209,7 +209,34 @@ } TotalKey=0; } bool Exist(CString s) { int left = 0; int right = TotalKey - 1; int mid; int index = -1; while (left <= right) { mid = (left + right) / 2; int r = elements[mid].Key->CompareNoCase(s); if (r < 0) {//key在右边 left = mid + 1; } else if (r > 0) {//key在左边 right = mid - 1; } else { index = mid; break; } } if (index == -1) return false; else return true; } Hashelement & Hash::operator [] (const char * str) { CString s1(str);