Skip to content

Instantly share code, notes, and snippets.

@yusukemihara
Created January 31, 2013 01:19
Show Gist options
  • Select an option

  • Save yusukemihara/4679042 to your computer and use it in GitHub Desktop.

Select an option

Save yusukemihara/4679042 to your computer and use it in GitHub Desktop.
C言語。マクロの中でマクロが使えるのか?テスト。結論=使える。
#if 0
#!/bin/bash
src=$0
obj=${src%.*}
gcc -o $obj $src
$obj
exit
#endif
#define PRICE "99"
#define SALEAD "" \
"zaku \\" PRICE "!\n" \
"gufu \\" PRICE "!?\n" \
"char zaku \\" PRICE "!!?\n"
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("%s",SALEAD);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment