[過去ログ] C++相談室 part165 (1002レス)
前次1-
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
210
(1): (オイコラミネオ MMeb-tjaG) 2024/02/06(火)20:42 ID:WnlTLfV5M(1/2) AAS
「The C Standard says that array indexes are (signed)
integers.
The reason behind that is that pointers and arrays
are close in C. For example, tab[index] is strictly
equivalent to *(tab + index). You can use pointer
arithmetic with negative values, hence an array
index can be negative」
省15
211: (オイコラミネオ MMeb-tjaG) 2024/02/06(火)20:47 ID:WnlTLfV5M(2/2) AAS
何がいいたいかと言えば、32BIT環境だと
符号付き整数の最大値は、
0x7fff_ffff ですから、
char a[0x7fff_ffff];
は合法ですが、
char a[0xffff_ffff];
はエラーです。よって、
省17
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.034s