個人的なメモを記していくためのページです。
C言語で[]と*の宣言が同じに扱われるのは関数の仮引数のなかだけで、例えば以下のような型定義<a><b>は等価ではない。
typedef int *foo_t; // <a>
typedef int bar_t[]; // <b>
bar_t data1={1,2,3,};
bar_t data2={3,4,5,};
foo_t items1[]={
data1,
data2,
};
bar_t items2[]={
//foo.cpp:13: declaration of `items2' as multidimensional array must have
//bounds for all dimensions except the first
//foo.cpp:19: assignment (not initialization) in declaration
data1,
data2,
};
クラシック・ドーム
ソフト・ドーム
ソフト・リム