There was a slight difficulty in splitting classes into several files. In .h I specify a class with prototypes and in the appropriate .cpp I initialize methods and objects. There is an app class that uses all other classes, but nevertheless, in these used classes, you need to refer to objects of the current instance of the app class.
I do as follows: in app.h I declared a class with prototypes, it has a declaration of class instances
material, control, objects.
Before that, he announced, no matter how wrong the expression, the class prototypes (so that at the next stage .h they would not include themselves through app.h).
class material; class control; class objects; Others .h have the same usage pattern, but I also need the app class in them, so it is done on app.h
In app.cpp, all the .h files are included, and in it when I initialize each class, I give them a link to the current app instance.
Is this the best way? Especially when it comes to complicating the structure of the application.