struct some_struct {int some; char value;};
#define SOME_STRUCT_INIT(name) \
struct some_struct *name = malloc(sizeof(struct some_struct));\
*name = (struct __##name){.some = 5, .value = 'a'}; // compound literal
Last active
March 30, 2022 05:41
-
-
Save kienvo/41a7ac2947ba23345c9501eacfc46000 to your computer and use it in GitHub Desktop.
Objective in C with MACRO
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment