Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- struct arg {
- int a;
- int b;
- };
- static void f(struct arg arg)
- {
- printf("a = %d, b = %d\n", arg.a, arg.b);
- }
- #define F(...) f((struct arg){ .a = 1, .b = 2, __VA_ARGS__ })
- int main(void)
- {
- F(.a = 10);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement