mqh multiple file inclusions?
nikolaygmt:
You may include it as many times as you need it, but only the first appearance is used by the compiler.
If myIndicator.mq4 includes:
#include "commonInclude.mqh"
#include "include1.mqh"
#include "include2.mqh"
and
both include1.mqh and include2.mqh include:
#include "commonInclude.mqh"
// custom code
how many times will commonInclude.mqh be included in the compiled version?
Thank you Ovo!
| Or put include guards like C++ and don't assume |
If myIndicator.mq4 includes:
#include "commonInclude.mqh"
#include "include1.mqh"
#include "include2.mqh"
and
both include1.mqh and include2.mqh include:
#include "commonInclude.mqh"
// custom code
how many times will commonInclude.mqh be included in the compiled version?