struct X {
X() : i( 1 ) {}
constint i;
};
voidOnStart()
{
X x1[1] = {}; //(1) нормально ???
X x2[1];
ZeroMemory( x2 );//(2) Error: 'x2' - not allowed for objects with protected members or inheritance
}
What is the fundamental difference between (1) and (2) ?
That contradicts your own concept that a variable is considered declared when the declaration is finalized. Why did you invent it in the first place? If it's so in one case and different in another
If you rewrite OnStart like this:
voidOnStart()
{
Y y = y; //Error: 'y' - undeclared identifier
}
then the compiler reacts according to the theory of
In the animation you can see that if you create a panel and then a trend line and put it under the button, the clicks on the button catch click events for the line. The button is ignored.
Tried setting the priority for the button this way: m_button3.ZOrder(100) - but it doesn't help.
There is also a CWnd::BringToTop() method, which I have set for the entire panel and separately for the button. But it's not quite clear how it should work, how to call it correctly and set this priority. Unpairing when calling this method shows that m_id is always equal to -1, although it's the object ID, judging by the comment, but m_name seems to show that the object is involved.
If anyone has a solution, please advise where to dig.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Contradiction:
What is the fundamental difference between (1) and (2) ?
Contradiction:
What is the fundamental difference between (1) and (2) ?
1 is initialisation at declaration, 2 is (generally speaking) change.
1 is initialization at declaration, 2 is (in general case) modification.
If x1[0].i can be zero, why can't x2[0].i? How is it worse?
Here is a simplified example of contradiction:
Here is a simplified example of a contradiction:
And here's another one:
Result: false
Whereas:
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
A100, 2021.11.16 13:40
Help from the experts :
Is it UB or what?
Is it UB or what?
This is a compiler defect - in theory there should be an error at compile time, because in MQL
Forum on trading, automated trading systems and strategy testing
Errors, Bugs, Questions
A100, 2020.09.30 16:54
That contradicts your own concept that a variable is considered declared when the declaration is finalized. Why did you invent it in the first place? If it's so in one case and different in another
If you rewrite OnStart like this:
then the compiler reacts according to the theory ofThis is a compiler flaw - in theory, there should be an error at the compilation stage, because in MQL
if you rewrite OnStart like this:
then the compiler reacts according to the theoryExactly.
Thank you!
Has anyone figured out how to use the standard library to increase the priority of the panel?
I took the code from the example from here.
In the animation you can see that if you create a panel and then a trend line and put it under the button, the clicks on the button catch click events for the line. The button is ignored.
Tried setting the priority for the button this way: m_button3.ZOrder(100) - but it doesn't help.
There is also a CWnd::BringToTop() method, which I have set for the entire panel and separately for the button. But it's not quite clear how it should work, how to call it correctly and set this priority. Unpairing when calling this method shows that m_id is always equal to -1, although it's the object ID, judging by the comment, but m_name seems to show that the object is involved.
If anyone has a solution, please advise where to dig.