我想知道C是否允许设置选择性#define
。 下面是我通过选择性的意思是: 如果我有定义的结构:C选择#define
typedef struct mystruct{
int (*pointer_function)(struct mystruct* ,struct mystruct);
...
} mystruct;
// and I have:
int main() {
mystruct s1, s2;
// when I do:
s1 = s2;
// I want my #define to recognize that on the left side
// I have mystruct type and use s1.pointer_function(&s1,s2);
}