You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
308 B
19 lines
308 B
5 years ago
|
#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;
|
||
|
}
|