fork download
  1. #include <iostream>
  2.  
  3. namespace NS1
  4. {
  5. namespace NS2
  6. {
  7. struct MyStruct
  8. {
  9. int x = 0;
  10. };
  11. }
  12.  
  13. using NS2::MyStruct;
  14. }
  15.  
  16. int main()
  17. {
  18. NS1::MyStruct myStruct;
  19. myStruct.x = 357;
  20.  
  21. std::cout << myStruct.x;
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
357