私は完全に理解していないコードで次のステートメントを見つけました:
UInt32 *pixels;
UInt32 *currentPixel = pixels;
UInt32 color = *currentPixel;
最初の 2 行は、UInt32 オブジェクト、ピクセル、および currentPixel の定義であるため、私には明らかです。しかし、次の行は正直言って意味がありません。そうでない理由:
UInt32 *color = currentPixel
しかし
UInt32 color = *currentPixel
その違いは何ですか?
currentPixel から * を削除すると、次のメッセージが表示されます。 Incompatible pointer to integer conversion initializing 'UInt32' (aka 'unsigned int') with an expression of type 'UInt32 *' (aka 'unsigned int *'); * による逆参照
* による逆参照とはどういう意味ですか?
ありがとうございました