I can't reply to my customers in private, financial transactions are blocked, customers are outraged because they can't activate the products they've bought.
fxsaber: Are you saying that a static variable should not have been initialised without a function call?
Furthermore.
class A { public: A() { Print( __FUNCTION__ ); } //в MQL вызывается, в С++ - нет }; void g( int i ) { if ( i ) return; static A a; } voidOnStart() { g( 1 ); }
In C++, for example, not every function call automatically leads to a call to the constructor A::A
Can fonts be included as resources in the EA ?
I told you once, I'll try again
after optimisation, I would like to save a pass report with pass parameters
Error during execution
A() { Print( __FUNCTION__ ); }
};
int g( int i )
{
static A a;
return 1;
}
void OnStart() {}
Result: A::A
while g() is not called at all
Error during execution
A() { Print( __FUNCTION__ ); }
};
int g( int i )
{
static A a;
return 1;
}
void OnStart() {}
Result: A::A
Are you saying that a static variable must not have been initialized without a function call?
It is not involved in the calculations at all in this case and the g() function only got into the text due to the inclusion of a generic .mqh file
A() { Print( __FUNCTION__ ); }
};
class B {
static A a;
};
void OnStart() {}
Compilation error
{
static int j = f( i ); //'i' - local variables cannot be used
return j + 1;
}
void OnStart() { f( 5 ); }
when creating a report after testing, some of the settings simply do not fit
I can't reply to my customers in private, financial transactions are blocked, customers are outraged because they can't activate the products they've bought.
wrote a request to SR #1656656
Are you saying that a static variable should not have been initialised without a function call?
Furthermore.
A() { Print( __FUNCTION__ ); } //в MQL вызывается, в С++ - нет
};
void g( int i )
{
if ( i )
return;
static A a;
}
void OnStart()
{
g( 1 );
}