I’ll write an header file,and it’s very long.Since it will be too complicated,i don’t want to put inner class definition in root class.I mean how can i make a class inner without writing it in root class.
class outer
{
}
class inner
{
}
If i can use like that, The header file will be clearer i think.
Like this:
Then, in the implementation:
Note that you can use the incomplete type
Foo::Innerinside the class definition ofFoo(i.e. infoo.hpp) subject to the usual restrictions for incomplete types, e.g.Innermay appear as a function return type, function argument, reference, or pointer. As long as the member function implementations for the classFoocan see the class definition ofFoo::Inner(by includingfoo_inner.hpp), all is well.