指示付き初期化子
指示付き初期化子(designated initializer)
配列の初期化や構造体の初期化がしやすくなる構文
code:memo
struct something my_struct = {
.field_1 = value,
.field_2 = value,
...
};
.field_1、.field_2が指示子(designator)
code:c
// Character names can be associated with enumeration constants
// using arrays with designators:
enum { RED, GREEN, BLUE };
const char *nm[] = {
};
確認用
Q. 指示付き初期化子
参考
メモ
調査用
Wikipedia.icon
Wikipedia.icon