struct A {
static const int a = 5;
struct B {
static const int b = a;
};
};
int main() {
return A::B::b;
}
The above code compiles. However if you go by Effective C++ book by Scott Myers(pg 14); We need a definition for a in addition to the declaration. Can anyone explain why this is an exception?
See Question&Answers more detail:os