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