Created
February 17, 2012 21:27
-
-
Save redbo/1855569 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
struct args { | |
int someval; | |
int someval2; | |
char *someval3; | |
}; | |
void _print_some_stuff(struct args a) | |
{ | |
printf("%d %d %s\n", a.someval, a.someval2, a.someval3); | |
} | |
#define print_some_stuff(stuff) _print_some_stuff((struct args){stuff}) | |
int main(int argc, char **argv) | |
{ | |
print_some_stuff(.someval2 = 3); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment