积极答复者
函数库Bug

问题
-
#include <string> #include <iostream> using namespace std; #include <Windows.h> int main(){ wstring str1 = L"新"; wstring str2 = L"更"; cout << lstrcmp(str1.c_str(), str2.c_str()) << endl; if (str1 < str2)cout << -1 << endl; cout << endl; wstring str3 = L"e55h"; wstring str4 = L"evgv"; cout << lstrcmp(str3.c_str(), str4.c_str()) << endl; if (str3 < str4)cout << -1 << endl; }
输出:
1
-1
-1
-1
如果lstrcmp能正确判断,将会输出-1- 已编辑 dream99 2015年3月6日 16:15