文字ポインタを反復処理し、ポインタがヌル ターミネータに到達するタイミングを確認すると、警告が表示されます。
const char* message = "hi";
//I then loop through the message and I get an error in the below if statement.
if (*message == "\0") {
...//do something
}
私が得ているエラーは次のとおりです。
warning: comparison between pointer and integer
('int' and 'char *')
*
逆参照メッセージの前にあると思ったmessage
ので、メッセージが指す場所の値を取得しますか? strcmp
ちなみにライブラリ機能は使いたくないです。