Errors, bugs, questions - page 1854

 
kaus_bonus:

build updated to 1580

https://www.mql5.com/ru/forum/43553/page19#comment_4844870

Wine problem solved. thanks.

How do you connect mt5 to the exchange under wine? i can't, as i understand there is a problem with the certificate
 
fxsaber:

Yes, you can't write it that way.

Yes, I did not pay attention at first that template parameter has no relation to arguments at all, then only full record.

But honestly I do not understand why you need a spherical parameter in a vacuum in a function?

 
Комбинатор:

But to be honest, I don't understand why you need a spherical parameter in a vacuum in a function.

It's easy to explain! Right now it works like this
#include <TypeToBytes.mqh>

void OnStart()
{
  double Array[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
  
  Print(_R(Array)[(short)7]); // Вытащили из массива short-значение по байтовому смещению 7
  Print(_R(Array)[(color)5]); // Вытащили из массива color-значение по байтовому смещению 5  
}

And you want it to work like this

  Print(_R(Array)<short>[7]); // Вытащили из массива short-значение по байтовому смещению 7
  Print(_R(Array)<color>[5]); // Вытащили из массива color-значение по байтовому смещению 5


Especially this one.

  Print(_R(Array)<MqlTick>[3].time); // Вытащили из массива MqlTick-значение по байтовому смещению 3
 
Make the structure a template structure and pass the type through it, alternatively
 
Комбинатор:
Make a template structure and pass the type through it as an option
Can you explain in more detail?
 
Konstantin:
How do you connect wine MT5 to the exchange? I can't, as I understand there are problems with the certificate

you cannot)) Certificates do not work under wine
 
kaus_bonus:

no way)) certificates do not work under wine
as far as i understand, wine cannot read the certificate as it does not understand Win standard, but if the certificate is converted to linux standard, i wonder if it will work?
 
fxsaber:
Can you explain in more detail?
template < typename T>
struct Struct
{
   void operator[] (int);
};
 

@fxsaber, I suggest doing something useful,
For example, in terms of studying templates in C++, translate the implementation of the most popular containers in MQL.
After all, it's not convenient to use standard Typed Containers, and they are not that good in terms of performance.

 
Sounds like a mockery
Reason: