fork download
  1. struct A;
  2.  
  3. void foo(A& r)
  4. {
  5. }
  6.  
  7. void bar(A* a)
  8. {
  9. foo(*a);
  10. foo(a[0]);
  11. }
  12.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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’
stdout
Standard output is empty