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'