I have little problem with using one object inside other object.
So, I'm writing code for STM32 and I decided to go with OOP(my First try). Now, I created .h and .cpp files for objects, classes etc..
Few "custom made" objects have global scope(defined at the top in main file) only one object has scope only in setup() function.
But, in code I use objects for display, RTC, servo etc.. (libraries from Arduino).
When I tried to use screen object inside boot object compiler said it's not defined. I googled and found solution that doesn't work( :( )
Your Adafruit_SH1106 object appears to have one constructor, of form:
Adafruit_SH1106::Adafruit_SH1106(int8_t)
This means there is no other way to create an Adafruit_SH1106 object. They can only be created with that construtor.
Your BootClass object contains an Adafruit_SH1106 object. Your BootClass object constructor must create the Adafruit_SH1106 using the right Adafruit_SH1106 constructor. You must tell it how.