fork(1) download
  1. #include <iostream>
  2.  
  3. namespace hello { namespace world { struct A {}; } }
  4.  
  5. namespace hello { void print(world::A) { } }
  6.  
  7. namespace hello { namespace world { void print() {} } };
  8.  
  9. int main() {
  10. hello::world::A a;
  11. print(a);
  12. return 0;
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:11:9: error: too many arguments to function ‘void hello::world::print()’
  print(a);
         ^
prog.cpp:7:42: note: declared here
 namespace hello { namespace world { void print() {} } };
                                          ^
stdout
Standard output is empty