diag0237.c

来自「开放源码的编译器open watcom 1.6.0版的源代码」· C语言 代码 · 共 36 行

C
36
字号
struct S;
typedef int (S::* mp0)();
typedef int (S::* mp1)(int);
typedef int (S::* mp2)(int,int);
typedef int (S::* mpc)(char);

struct S {
    int one();
    int two();
    int two(int);
    int three();
    int three(int);
    int three(int,int);
    int mixed();
    int mixed(int);
    int mixed(int,int);
    static int mixed(char);
    static mp1 a[];
};

mp1 S::a[] = { two, three };

mp0 x0 = &S::one;
mp1 x1 = &S::two;
mp2 x2 = &S::three;

void foo( mp0 );
void foo( mp1 );
void foo( mp2 );

void foo() {
    foo( &S::one );
    foo( &S::two );
    foo( &S::three );
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?