首页 文章
  • 15 votes
     answers
     views

    可以使用代码块作为C宏的参数吗?

    我有一个模式,基本上是一些样板代码,其中一部分在中间变化 if(condition){ struct Foo m = start_stuff(); { m.foo = bar(1,2); m.baz = 17; } //this part varies end_stuff(); } 是否可以使宏taht将该中间代码块作为参数? C中的宏扩展规则看起来非常复杂,所以我不确定...

热门问题