struct A; void foo(A& r) { } void bar(A* a) { foo(*a); foo(a[0]); }
Standard input is empty
prog.cpp: In function ‘void bar(A*)’: prog.cpp:10: error: invalid use of incomplete type ‘struct A’ prog.cpp:1: error: forward declaration of ‘struct A’
Standard output is empty