fork download
  1. struct A {
  2. typedef int foo;
  3. void function(foo a);
  4. };
  5.  
  6. struct B {
  7. void function(foo a); //error: 'foo' has not been declared
  8. typedef int foo;
  9. };
  10.  
  11. int main() {}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:7:18: error: 'foo' has not been declared
stdout
Standard output is empty