Errors, bugs, questions - page 550

 
WWer:

Shouldn't this code compile?

At the moment, class members cannot have the modifier const
Документация по MQL5: Основы языка / Типы данных / Структуры и классы
Документация по MQL5: Основы языка / Типы данных / Структуры и классы
  • www.mql5.com
Основы языка / Типы данных / Структуры и классы - Документация по MQL5
 

On the mql5 forum all is fine.

It is raining again in the village of Gadyukino (mql4). Any predictions when electricity will be invented?

Or, - we are coming to you ... :)

 

Urain:
Тело деструктору добавьте, хоть бы  и пустое.

I wanted to add something clever. I couldn't...

 
tara:

I don't understand, is that a prejudice?

it won't compile without a destructor body.

that's how it works:

class name
  {
public:
                     name(void);
                    ~name(void){};
  };

but not like this:

class name
  {
public:
                     name(void);
                    ~name(void);
  };
 
TheXpert:

Initialization of a constant member has to happen somewhere.

I guess you can't use constant terms only :) . It should also be static, for a good reason.

There are tasks where not all instances of a class must have the same constant variable, so static is a separate topic.

mql5:
At the moment, class members cannot have the const modifier

I hope that with time MQL5 will become more and more like C++. Although I hope that overloading of operators will be enough for me :)

Urain:

I haven't managed to understand it, is that an excuse?

It will not compile without destructor body.

You're confusing things, it will compile anyway.
 
WWer:

...

You're confused, it will compile anyway.

Example above, paste F7 into an empty file and you can see everything with your own eyes.
 
Urain:
Example above, paste in an empty F7 file and you can see everything with your own eyes.
clearly... just in the *.mqh file compiles...
 
WWer:
I see... It's just compiled in *.mqh file...
Yes, not all checks are done in mqh, it is possible that the destructor body is already in the script itself.
 

In the MQL5 Reference Manual/Standard Library/Trading Classes/CAccountInfo/MaxLotCheck

is incomplete description of the function parameters, there are three of them in the description.

If you open MetaEditor Navigator MQL5/Include/Trade/AccountInfo.mqh to find the line with MaxLotCheck, the description contains one more parameter percent

 

Dear developers, please make the optimizer and tester work until the current time, not until the end of the previous trading day.
The current situation is such that the current trading day completely falls out of the optimization period (((

Many systems work on timeframes much smaller than D1 and for them it is critical!