nullptr is a part of C++11. You can pass `-std=c++0x` to g++ and it should work fine without aditional hacks. (and this #define will override the builtin nullptr, since it's not a macro)