December 3, 1999

DevX - Software Development Resource

Nested Class and Forward Declarations

You cannot forward declare a nested class. For this reason, the following code will not compile: // assuming class B is nested in class A int main() { class A::B;