Tuesday, November 2, 2010

Using Declarations

The following code compiles:

  struct A {
    static const int a = 5;
    struct B {
      static const int b = a;
    };
  };
  int c = A::B::b;
  int main()
  {
    return c;
  }

No comments:

Post a Comment