MQL OOP - Cross references between classes.
Miroslav Popov:
Hello,
How to make two classes in a way that each class to have a reference to the other? In general I want to have later these classes in separate files.
The problem is that when I define the classes, the first class doesn't see the second definition.
Not sure if the splitting into files makes it different, but I have been using forward declaration
class Bar;
class Foo {
Bar *MyBar;
...
Thank you Ovo,
It solves the problem. I must have missed it.
Hello,
How to make two classes in a way that each class to have a reference to the other? In general I want to have later these classes in separate files.
The problem is that when I define the classes, the first class doesn't see the second definition.