Errors, bugs, questions - page 2260

 

A compile-time error:

template<typename T>
class A { protected:
        int x;
};
template<typename T>
class B : public A<T> {
        int x;
        void f() {
                int y = A<T>::x;     //нормально
                        A<T>::x = 0; //Error: '=' - semicolon expected
        } 
};
void OnStart()
{
        B<int> b;
}

And without the template, it's fine. What difference does it make?

 
A100:

Error during compilation:

And without the template, it's fine. What difference does it make?

Thanks for the message.

We'll fix it.

 

MetaEditor 1881/32 hangs... Just open the attached file and then e.g. start the compilation process or open any other file

Files:
_tmp.mq5  1 kb
 

unknown-tultiple


 

Greetings!

IsStringFind case-sensitive or not?

 
Konstantin Kulikov:

Greetings!

Is StringFind case-sensitive or not?

Checked, case-sensitive, but is there any way to implement a case-insensitive search?

 
Konstantin Kulikov:

Checked case-sensitive, but is there any way to implement a case-insensitive search?

Like this:

P.S. No, that won't work, though. You can search, but you have to write your ownStringFind
Документация по MQL5: Строковые функции / StringToLower
Документация по MQL5: Строковые функции / StringToLower
  • www.mql5.com
Строковые функции / StringToLower - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Vitaly Muzichenko:

That's about right:

Got it, thanks.

 

How do I get this data through MQL?


 
fxsaber:

How do I get this data through MQL?


if(PositionSelect(Symbol()))
  {
    double cur_sl = PositionGetDouble(POSITION_SL);
    double cur_tp = PositionGetDouble(POSITION_TP);
  }