fork download
  1. #include <iostream>
  2.  
  3. namespace a{ void foo(); }
  4. namespace b{ void foo(); }
  5.  
  6. void a::foo()
  7. {
  8. std::cout << "a foo" << std::endl;
  9. }
  10.  
  11. void b::foo()
  12. {
  13. std::cout << "b foo" << std::endl;
  14. }
  15.  
  16. int main()
  17. {
  18. a::foo();
  19. b::foo();
  20. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
a foo
b foo