Does anyone have this compiled? What's wrong with it?
It's OK, come back for more:
class B {};
template<typename T>
class A
{
static T *array;
staticvoid check(){
T *ptr = array;
}
};
template<typename T>
static T *A::array;
class Y: public A<B>
{
};
voidOnStart()
{
Y y;
}
definition for static array has been moved above the creation of class Y.
Is it now possibleto run optimization+teston all symbols in the market review? Or only without optimization just run with the same parameters is done on the whole review?
That is, you can run a test not only with the same parameters for the symbols in the Market Watch, but optimize them at the same time? Otherwise, the selection of optimization parameters is blocked when all symbols are selected.
Тестер стратегий позволяет тестировать и оптимизировать торговые стратегии (советники) перед началом использования их в реальной торговле. При тестировании советника происходит его однократная прогонка с начальными параметрами на исторических данных. При оптимизации торговая стратегия прогоняется несколько раз с различным набором параметров...
Бывает, нужно советник прогнать на множестве символов. Для этого в MT5-тестере существует режим "Все символы, выбранные в окне Обзора рынка". Получается прогон одних и тех же настроек советника на разных символах. Но иногда требуется сделать много различных запусков MT5-тестера. Данная библиотека позволяет это. Возможности. Можно задавать...
I think I read that this has already appeared in the standard tester?
I would like to know how to run your libraries, it's not clear. After all, you have to specify the Expert Advisor itself in the tester, but how do I launch the library?
Or, do you copy the skiyal to the terminal and everything works by itself?
class A
{
protected:
int field;
public:
A() { field = rand(); }
};
class B: public A
{
public:
B(A &origin)
{
field = origin.field;// это другой экземпляр, C++ дает ошибку 'int A::field' is protected
}
int getField(void) const
{
return field;
}
};
voidOnStart()
{
A a;
B b(a);
Print(b.getField());
}
But according to C++ rules it should not allow access to protected (field of another object, albeit of the same class; protected denotes access only to inherited fields of the same object, while for access to alien fields it must be public). Is this a bug or a feature?
But according to C++ rules, it shouldn't allow access to protected at compile time. Is it a bug or a fix?
What do you mean it shouldn't? In what particular place? So your code is public inheritance (i.e. proctored members in descendants become public) and method is public.
Does anyone have this compiled?
What's wrong with it?
It's OK, come back for more:
definition for static array has been moved above the creation of class Y.Is it now possibleto run optimization+teston all symbols in the market review? Or only without optimization just run with the same parameters is done on the whole review?
That is, you can run a test not only with the same parameters for the symbols in the Market Watch, but optimize them at the same time? Otherwise, the selection of optimization parameters is blocked when all symbols are selected.
Is it now possibleto run an optimisation+teston all the symbols in the market review?
https://www.mql5.com/ru/code/26132
https://www.mql5.com/ru/code/26132
Yes.
Unable to commit to storage...
Same problem again! Developers, please fix the storage! It's impossible to work with it. Common error.
It's OK, come again:
We're in touch. This code works:
But according to C++ rules it should not allow access to protected (field of another object, albeit of the same class; protected denotes access only to inherited fields of the same object, while for access to alien fields it must be public). Is this a bug or a feature?
We turn. This is the code that works:
But according to C++ rules, it shouldn't allow access to protected at compile time. Is it a bug or a fix?
What do you mean it shouldn't? In what particular place? So your code is public inheritance (i.e. proctored members in descendants become public) and method is public.
s.w. rubbed my eyes, saw where, sorry)We turn. This is the code that works:
But according to C++ rules, it shouldn't allow access to protected at compile time. Is this a bug or a fix?
Yes, C++ online swears:https://onlinegdb.com/Hkv1_13EU
That's up to the developers.
Yes, C++ online swears:https://onlinegdb.com/Hkv1_13EU
That's up to the developers.
Yes, let's listen to the developers. I have now taken advantage of this convenient hole. If they close it, I'll have to look for other ways.