This is called forward declaration, you declare incomplete class for type to work in header file, later it is properly declared in different include in cpp file (note that true function of #include is pasting content of the file to another file and fact that header files alone are never compiled on there own they are used in compilation of cpp files) if type is really used in cpp file, otherwise you will get use of incomplete type error. This is to avoid circular dependency in header files which may cause issues, if possible you should avoid including header file other then one containing base class of class you declaring, and forward declaration is one of methods to avoid that.
You can read about it here: