conv2.c

来自「linux下的gcc编译器」· C语言 代码 · 共 20 行

C
20
字号
// Build don't link:// Special g++ Options: -pedantic-errorsvoid cheat( int* i ) { ++(*i); } struct t {        void cheat( int& i ) { ++i; }};int main(){  void (t::*member)( const int& ) = &t::cheat; // ERROR - conversion  void (*cheater)( const int* ) = &cheat; // ERROR - converting  t t2;  const int i=1;  int j=1;  (t2.*member)( i );  (t2.*member)( j );}

⌨️ 快捷键说明

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