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.
2行のコードを用意しましょう:
&car->speed &(car->speed)
speed
これら2行は同等ですか?どちらの場合も速度に対応できますか?
はい。->unary よりも優先順位が高い&ため&car->speed、 と&(car->speed)は同等です。
->
&
&car->speed
&(car->speed)
それらが同等である場合、コーディング規則として選択する方が良いものは何ですか?
のアドレスに関心がある意図した動作を示しているため、2 番目に移動しますspeed。