B.A.T.M.A.N./A.L.F.R.E.D。 OpenMesh项目:void(* foo)(void):最新(void)的含义
function read_answer实例化一个指针类型struct vis_print_ops被定义
struct vis_print_ops
{
void (*preamble)(void);
void (*interfaces)(uint8_t iface_n, struct vis_iface *ifaces);
void (*entries)(uint8_t entries_n, struct vis_entry *vis_entries,
uint8_t iface_n, struct vis_iface *ifaces);
void (*postamble)(void);
};
现在看
void (*preamble)(void)
你能告诉我什么是最后一个(空)的含义?是不是
void (*preamble)
够了吗?
它的重要性意味着它是一个没有参数的函数指针。 – Linus