宏函数定义问题(谢谢各位,可是没有悬赏。。。)

问大家一个问题:

struct example
{
int bin;
int pin;
};

定义宏函数: #define assign_struct(s, a, b) \
s->bin = a; \
s->pin = b

主函数:
struct example ex_struct;
assign_struct(ex_struct, 1, 2);

                    会报“Error:表达式必须包含指针类型”,是什么原因啊?

不是我说啊同志,这个真难,看到头疼

因为 ex_struct 不是指针,所以不能按指针的操作访问。

s有问题,定义不是指针!

http://zhidao.baidu.com/link?url=B2TvwxY9E-wPoHubrNAWMClU5-K0ngdNuLbGHOlrU2swMur3jnsjEpylMp41D8H-i-pt2g1KhxpesxdQxEVNyRpr6STwYR8xiun0FjxE0Iu

你ex_struct用指针类型,或者define中用点号访问,不用->

传递的根本就不是指针嘛,为啥要用指针调用方式呢