字符串比较在 Visual C++ 中不起作用 2005年
如果从注册表中获得一个铃声,并且当我将其放入消息框中时它会正确显示。 ::MessageBoxW(0, (LPCWSTR)achValue, _T("找到"), MB_YESNO);
该值存储在 archValue 中,它是一个 DWORD。 我想做的是将其与以下字符串“2.0.7045.0”进行比较,但 strcmp 对我不起作用。
任何关于如何做到这一点的想法将不胜感激。 C++ 相当垃圾,而且我无法轻松调试,因为它在 dll 中。
非常感谢
托尼
If get a gring from the registry and it correctly displays when I place it in a message box.
::MessageBoxW(0, (LPCWSTR)achValue, _T("Found"), MB_YESNO);
The value is stored in archValue which is a DWORD. What I want to do is compare it to the following string "2.0.7045.0" but strcmp fails to work for me.
Any ideas on how to do this wiould be greatly appreciated.
Pretty rubbish at c++ and I cant debug easily as its in a dll.
Much appreciated
Tony
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
评论(3)
~没有更多了~
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
您需要使用 strcmp 的宽字符版本: wcscmp< /a>.
You need to use the wide char version of strcmp: wcscmp.