结构体系成员初始化的方法
请教一下,下面这是个什么语法?
- C/C++ code
struct abc_closure { abc_handler p; void *data; intptr_t intdata; int refcount; };struct abc_closure vac = { .p = &incoming_interest };{ .p = &incoming_interest }
这个是在给p赋初值?
居然还有这种语法,第一次见。
求详细说明。
[解决办法]
形式是这样的!
struct test{
int a;
};
struct test test={.a=123};