fork download
  1. #include <iostream>
  2.  
  3. namespace A {
  4. namespace B {
  5. struct C {
  6. struct D {
  7.  
  8. };
  9. };
  10. }
  11. }
  12.  
  13. #define TOSTR(X) #X
  14.  
  15. int main() {
  16. std::cout << TOSTR(std::cout) << std::endl;
  17. std::cout << TOSTR(A) << std::endl;
  18. std::cout << TOSTR(A::B) << std::endl;
  19. std::cout << TOSTR(A::B::C::D) << std::endl;
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
std::cout
A
A::B
A::B::C::D