Skip to content

Instantly share code, notes, and snippets.

@Nigh
Created September 3, 2015 15:28
Show Gist options
  • Save Nigh/1f2b036d86eaa8c71a16 to your computer and use it in GitHub Desktop.
Save Nigh/1f2b036d86eaa8c71a16 to your computer and use it in GitHub Desktop.
贴代码的正确姿势
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;
}
}
@liango2
Copy link

liango2 commented Oct 18, 2016

为什么在群里贴会被打死呢
ฅ()• - •)ฅ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment