我想知道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);
}