首页 > 解决方案 > 宏观理解

问题描述

我以前从未见过以下宏格式:

#define foreach_nat_det_in2out_error                    \
_(UNSUPPORTED_PROTOCOL, "Unsupported protocol")         \
_(NO_TRANSLATION, "No translation")                     \
_(BAD_ICMP_TYPE, "unsupported ICMP type")               \
_(OUT_OF_PORTS, "Out of ports")                         \
_(IN2OUT_PACKETS, "Good in2out packets processed")

有人见过这种格式吗?你能解释一下这段代码发生了什么吗?

标签: cmacros

解决方案


推荐阅读