3 ms·
C99 has compound literals which allows you to call functions that take struct values or pointers to structs like this: my_func((my_type){ .x = 1, .y = 2 })
by flohofwoe 2y ago
C99 has compound literals which allows you to call functions that take struct values or pointers to structs like this:
my_func((my_type){ .x = 1, .y = 2 });
my_func(&(my_type){ .x = 1, .y = 2 });