fork(1) download
  1. namespace ns1
  2. {
  3.  
  4. void foo(int){}
  5.  
  6. namespace ns2
  7. {
  8.  
  9.  
  10. void foo(){}
  11.  
  12. void test()
  13. {
  14. //using ns1::foo;
  15. foo(42);
  16. }
  17.  
  18.  
  19. } // namespace ns2
  20. } // namespace ns1
  21.  
  22.  
  23. int main()
  24. {
  25. }
Compilation error #stdin compilation error #stdout 0s 15232KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘void ns1::ns2::test()’:
prog.cpp:15:8: error: too many arguments to function ‘void ns1::ns2::foo()’
  foo(42);
        ^
prog.cpp:10:6: note: declared here
 void foo(){}
      ^~~
stdout
Standard output is empty