addrfunc4.c
来自「this is a gcc file, you can download it 」· C语言 代码 · 共 25 行
C
25 行
// Test that an object-dependent reference to a member function can be// used to produce a pointer to member function, as in VC++.// Contributed by Jason Merrill <jason@cygnus.com>// Special g++ Options: -fms-extensionsstruct A{ int f(int a) { return 0; } void f(int a, int b) { }};typedef int (A::* pmf1)(int);typedef void (A::* pmf2)(int, int);int main(){ A a; pmf1 fn1; pmf2 fn2; fn1 = a.f; fn1 = (pmf1)a.f; fn2 = (pmf2)a.f;};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?