I want to define a macro which includes another header file like so:
#define MY_MACRO (text) #include "__FILE__##_inline.inl"
So that when the preprocessor parses file person.h, MY_MACRO(blahblah) expands to
#include “person.h.inline.inl”
any hints on how to do this ?
It’s not possible to use
#defineto construct other preprocessor directives, unless you run the preprocessor twice.But in your case even running the preprocessor twice won’t help because the
#includemust be a single string of the form"..."or<...>.