macro definition containing #include directive

前端 未结 9 958
抹茶落季
抹茶落季 2020-12-08 06:55

Is there a way to define a macro that contains a #include directive in its body?

If I just put the \"#include\", it gives the error

9条回答
  •  臣服心动
    2020-12-08 07:18

    Why would the macro need to have an #include? if you're #include'ing whatever file the macro is in, you could just put the #include above the macro with all the rest of the #include statements, and everything should be nice and dandy.

    I see no reason to have the macro include anything that couldn't just be included in the file.

提交回复
热议问题