Passing the value of a variable to macro in C

前端 未结 3 1632
清酒与你
清酒与你 2020-12-20 18:11

I\'m trying to pass the value of a variable to a macro in C, but I don\'t know if this is possible. Example:

#include 

#define CONCVAR(_n) x          


        
3条回答
  •  感动是毒
    2020-12-20 18:44

    No, because the value of i only exists at run-time. Macro expansion happens at compile-time.

提交回复
热议问题