lookup18.c

来自「this is a gcc file, you can download it 」· C语言 代码 · 共 24 行

C
24
字号
// Test that referring to an ambiguous base in name lookup prevents// access to the field, even though the field is not ambiguous.// Build don't link:struct A {  int i;};struct B: virtual A { };struct C: public B { };struct D: public B { };struct E: public C, public D {  void f ();};void E::f() {  B::i = 0;			// ERROR - B is ambiguous}void f () {  E e;  e.B::i = 0;			// ERROR - B is ambiguous}

⌨️ 快捷键说明

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