【发布时间】:2012-05-04 21:50:55
【问题描述】:
我想知道 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);
}
【问题讨论】:
标签: c c-preprocessor