[ create a new paste ] login | about

Link: http://codepad.org/DiAC35hl    [ raw code | output | fork | 1 comment ]

RogerPate - C++, pasted on Oct 5:
1
2
3
4
5
6
7
8
9
10
#define S1(v) #v
#define S2(v) S1(v)

#define MACRO value

int main() {
  puts("S1(MACRO) = " S1(MACRO));
  puts("S2(MACRO) = " S2(MACRO));
  return 0;
}


Output:
1
2
S1(MACRO) = MACRO
S2(MACRO) = value


Create a new paste based on this one


Comments:
posted by RogerPate on Oct 5
reply