Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdint.h>
  3. namespace A {
  4.     namespace B{
  5.         namespace C {
  6.             class D {
  7.             public:
  8.                 void g() {
  9.                 }
  10.             };
  11.             D dd;
  12.         };
  13.         class F {
  14.         };
  15.     };
  16.     class E {
  17.     public:
  18.         void f() {
  19.             using B::F;
  20.             using B::C::D;
  21.             F f;
  22.             D d;
  23.             using ::A::B::C::dd;
  24.             using ::std::cout;
  25.             dd.g();
  26.             cout << "Hello World!" << ::std::endl;
  27.         }
  28.     };
  29. };
  30. int main() {
  31.     A::B::C::D b;
  32.     using ::A::B::C::D;
  33.     D b2;
  34.     ::A::E e;
  35.     e.f();
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement