pmf2.c
来自「gcc-you can use this code to learn somet」· C语言 代码 · 共 22 行
C
22 行
// Special g++ Options: -Wno-pmf-conversions// Test conversion of pointers to virtual member functions to// pointers to non-member functions.struct A{ int i; A::A():i(1){} virtual void foo();}a;void A::foo(){ i = 0;}int main(){ void (*f)(A*) = (void(*)(A*))(&A::foo); f(&a); return a.i;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?