pass block instruction as macro's argument in C

后端 未结 3 926
鱼传尺愫
鱼传尺愫 2021-01-26 18:02

I don\'t know if that is possible, I want to pass a block of instructions in macro like an argument.I will show you an example:

#define ADD_MACRO(size, BLOCK){ f         


        
3条回答
  •  轮回少年
    2021-01-26 18:38

    thks for all, especially Potatosmatters, so I follow your directives and I would like to resume your answer into small code that can be useful for the others:

    #define CALL_MACRO(size,instructions){ for(int i=0;i

    So the result of CALL_MACRO depends on what you insert as instructions.

提交回复
热议问题