Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不是一个非常有经验的 C++ 程序员,当我执行以下操作时会收到警告:
if (myString[i] != 'x') { }
比较这些的适当方法是什么?
感谢您的帮助!
可能性 1:标识数组中元素的 int 不应大于常规 int。
可能性 2:如果 myString 是 std::wstring 类型,则适当的比较是myString[i] != L'x' (ty popester!)
myString[i] != L'x'