1

I'm trying to do something along the lines of this:

#define DEF(name) \
#ifndef DEFINED_##name \
    MyClass name; \
#endif

However, I get the following error:

include/file.h:38:17: error: '#' is not followed by a macro parameter
 #define DEF(name) \

Is there anyways to do this?

Chris Smith
  • 2,928
  • 4
  • 27
  • 59

0 Answers0