I am trying to declare a class"Application" and inside this class"Application" make a object of class "Airplane" and "Airplane" constructor takes reference object of class "Application" how to make that?
Exzample:
"Airplane.h"
class Application;
class Airplane
{
public:
Airplane(Application& objApp);
int wings;
};
"Application.h"
#include "Airplane.h"
class Application
{
public:
Airplane objectofAirplane (*this);
};
Youtube is crashing so hard. Cant get to tutorials, cant even see how to define this
Basically what i am trying to achieve is to call a function from class "Application" in "Airplanes constructor".
Now i don't think this is possible but... worth asking.