I'm using g++ compiler, and I want certain lines of my c++ code to be commented out or not commented, depending on my config.
I realise that I could do:
#ifdef DEBUG
cout << "foo" << endl;
#endif
But I would rather it all be on a single line:
#define DEBUG //
DEBUG cout << "foo" << endl;
...with DEBUG being a macro for //. But writing #define DEBUG // yields nothing. Can anyone tell me what to do?