本帖最后由 Demon 于 2012-8-13 16:03 编辑
if在内部是使用lstrcmpW函数来比较字符串是否相等的(详见《批处理技术内幕:IF命令》)- #include <stdio.h>
- #include <Windows.h>
-
- int main()
- {
- wchar_t s1[] = L"〇";
- wchar_t s2[] = L"";
-
- printf("%d\n", lstrcmpW(s1, s2));
- return 0;
- }
复制代码 XP系统下返回0,Vista之后的系统返回1,也许是XP系统的lstrcmp函数有BUG? |