今日はlong と int は同じビット数であるが意味は違うということを学び直した。longは32ビットの整数でintはCPUにおける標準の整数だから、32ビットシステムでは同じになる。※ただし宣言時にはintを使うことで「現環境で最も自然な大きさの整数型」となるので負担が少ない
-
-
ISO C++ でも C の規格を参照する形で INT_MAX が 32767 (2**15 - 1) 以上となることが要求されているので「intが8bit」は無いです。 https://stackoverflow.com/questions/26292617/about-int-min-long-min-long-long-min/26292949#26292949 …
-
なるほど
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.