Skip to content

Instantly share code, notes, and snippets.

Created Jul 25, 2015
What would you like to do?
/// test #1
#define u using
#define n namespace
#define s std
// so can this work?
u n s;
// yes indeed it can!
/// test #2
#define spit return
// does it work?
int meaningOfLife() {
spit 42;
// meaningOfLife() returns 42
/// test #3 - let's go more in depth.
#define thing int
#define methodName meaningOfLife()
#define answer 42
// let's test it:
thing methodName {
// we defined spit before so I didn't redefine it
spit answer;
// that returns 42!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment