Inner classes

 

Is it possible to write an inner class without placing the whole inner class inside the parent class? 
Something like include, or writing it elsewhere as to not interfere the clarity of the outer class?

 
MT4 has no concept of inner classes. It is the same as if you wrote them separately.
class Out{
   class In{ public: int i;};
   In out[2];
   Out(){out[1].i=1;}
};
int OnInit(){
  In a; // Private Definition of In is visible here.
  return(INIT_SUCCEEDED);
}
 
William Roeder:
MT4/5 has no concept of inner classes. It is the same as if you wrote them separately. So don't bother.
That's not true for mql5.
 
Amir Yacoby:

Is it possible to write an inner class without placing the whole inner class inside the parent class? 
Something like include, or writing it elsewhere as to not interfere the clarity of the outer class?

#include seems to work well.
 
William Roeder:
MT4/5 has no concept of inner classes. It is the same as if you wrote them separately. So don't bother.

That was changed for MT5 when they introduced scopes and namespaces - see #7

Alain Verleyen:
#include seems to work well.

I was sure to test it, thank you
Actually I tested with more complex class and it failed, but probably for other reasons