[ create a new paste ] login | about

Link: http://codepad.org/ZECUiV5V    [ raw code | output | fork ]

C++, pasted on Aug 4:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>

#define BLOCK(x) BLOCK_I x
#define OPEN )
#define BLOCK_I()
#define END END_I(
#define END_I()

#define STR(a) STR_I(a)
#define STR_I(a) #a

int main() {
    using namespace std;
    cout << STR(BLOCK((OPEN { return f(1, 2); } END))) << endl;
}


Output:
1
{ return f(1, 2); }


Create a new paste based on this one


Comments: