Skip to content

Instantly share code, notes, and snippets.

@zxkletters
Last active December 23, 2015 14:19
Show Gist options
  • Save zxkletters/6648509 to your computer and use it in GitHub Desktop.
Save zxkletters/6648509 to your computer and use it in GitHub Desktop.
定义for循环宏
#include <stdio.h>
#define foreach_range10 int i; \
for(i=0;i<10;i++){\
printf("%d\n",i);\
}
main() {
foreach_range10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment