I was trying to create and initialize a struct using a variable length macro. I want to be able create/initialize the struct with '0's and then initialize some fields of the struct with values that were optionally passed in.
Is this possible to do? I was trying the following:
#define INIT_ENTRY(x, ...) \
entry_t x = {.id = 0, .age = 0} \
x.id = <I want to use arg1 here>
x.age = <i want to use arg2 here if it exists>
Is there a way to accomplish this?