class B;
class A
{
protected:
int i;
public:
voidoperator =( const B* Value )
{
this.i = Value.i; // 'i' - protected member access error// А так можно!this.i = ((A*)Value).i; // и нет ошибки: cannot convert from const pointer to nonconst pointer
}
};
class B : public A {};
I thought the situation would be the same in both cases. But no!
has already been fixed, please wait for the new build.
We need to see how exactly it is fixed because in a similar case the Microsoft compiler requires for a reason to take the implementation of the method (in this case operator =) outside the class
This seems to be the wrong behaviour for the language, as it limits the possibilities.
struct A {};
class B
{
public:
const A a;
B( const A &in ) : a(in) // 'a' - constructor not defined
{
}
};
I need to define a const field as a structure. I thought the copy operator would work, but the compiler wants a constructor instead, because the syntax is similar. But it is wrong.
TimeTradeServer can return all sorts of nonsense. For example, a value less than TimeCurrent. This completely nullifies its practical application.
If I understand the idea correctly, the TimeTradeServer must calculate the elapsed time after receiving TimeCurrent and add this difference, sort of emulating the future TimeCurrent values.
I thought the situation would be the same in both cases. But no!
fxsaber:
How do you know the name of a file from its handle?
You can only do this inside class A. Seems fine to me.
error
has already been fixed, please wait for the new build.
ошибка
has already been fixed, please wait for the new build.
MetaEditor adds a point to the filename
Sequence of operations:
As a result the file name will be Test2..txt instead of Test2.txt
Notepad, all other things being equal, does not add extra dots to the file namefxsaber:
has already been fixed, please wait for the new build.
We need to see how exactly it is fixed because in a similar case the Microsoft compiler requires for a reason to take the implementation of the method (in this case operator =) outside the class
https://www.mql5.com/ru/forum/1111/page2001#comment_5679732
https://www.mql5.com/ru/forum/1111/page2001#comment_5680465
This seems to be the wrong behaviour for the language, as it limits the possibilities.
I need to define a const field as a structure. I thought the copy operator would work, but the compiler wants a constructor instead, because the syntax is similar. But it is wrong.
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
fxsaber, 2017.05.19 22:35
TimeTradeServer can return all sorts of nonsense. For example, a value less than TimeCurrent. This completely nullifies its practical application.
If I understand the idea correctly, the TimeTradeServer must calculate the elapsed time after receiving TimeCurrent and add this difference, sort of emulating the future TimeCurrent values.
Now, having run the Expert Advisor
you can see any nonsense.
Note the dates.