parent
9564915e08
commit
9866fa0533
@ -0,0 +1,18 @@ |
||||
#include <stdio.h> |
||||
|
||||
#define HELL 10 |
||||
#define IDE 220 |
||||
#define MAKE_ENTRY(value) {"value", value} |
||||
const struct { |
||||
const char * const name; |
||||
const unsigned short value; |
||||
} init[] = { |
||||
{"lol", 1}, |
||||
{"hello", HELL}, |
||||
MAKE_ENTRY(IDE) |
||||
}; |
||||
|
||||
int main (void) { |
||||
printf("%s\t%d\n", init[2].name, init[2].value); |
||||
return 0; |
||||
} |
Loading…
Reference in new issue