Created
September 3, 2015 15:28
-
-
Save Nigh/1f2b036d86eaa8c71a16 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
int main() { | |
struct mylist { | |
int a; | |
struct mylist* next; | |
}; | |
#define cons(x, y) (struct mylist[]){{x, y}} | |
struct mylist *list = cons(1, cons(2, cons(3, NULL))); | |
struct mylist *p = list; | |
while(p != 0) { | |
printf("%d\n", p->a); | |
p = p -> next; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
为什么在群里贴会被打死呢
ฅ()• - •)ฅ