Errors, bugs, questions - page 1223

 
valeryk:
#1085286 with a similar problem. In multiple orders, clearly not related to any particular one.

Already corrected it, thanks.

An update will be available in a few minutes.

 
murad:

Already corrected, thank you.

An update will be available in a few minutes.

Yeah, it's working,

but why does the picturedownloadas a file and not open in the browser like it did 2 days ago??? Or is it something wrong with me?

 
ALXIMIKS:

standard script - "perion_converter_new" loads the kernel 100%

This is normal - the lag is unbelievable. 723 build


I haven't seen it create such problems.

Now, in 725 - same (not noticed in creating problems).

You didn't correct its code yourself?


P./S.: Assuming these posts can be deleted now. Since the forum is on MT5.

 
valeryk:
I wonder if I'm the only one left with a single English in the localisation list after upgrading MT5 to 991?
This is a beta. Everything will be in place in the release.
 

This is a question for OOP experts.

There is a class. It has this template method:

//+------------------------------------------------------------------+
//| Template for getting the value                                   |
//+------------------------------------------------------------------+
template<typename T>
T CGlobalVar::Value(void)
  {
   return (T)this.m_value;
  }

The compiler doesn't complain when compiling the definition file.

Then I call this method in the script:

int nRes=gVar1.Value();


I get an error "could not deduce template argument #0".

 
denkir:

This is a question for OOP experts.

There is a class. It has this template method:

The compiler doesn't complain when compiling the definition file.

Then I call this method in the script:


I get an error "could not deduce template argument #0".

Unfortunately, in MQL you can typecode a function only by parameters, because you cannot explicitly specify the required type, unlike in C++.
int nRes=gVal1.Value<int>();
This limitation can be circumvented by adding a fake parameter:
//+------------------------------------------------------------------+
//| Template for getting the value                                   |
//+------------------------------------------------------------------+
template<typename T>
T CGlobalVar::Value(T)
  {
   return (T)this.m_value;
  }

int nRes=gVar1.Value((int)0);
 

Compilation error ##

#define  MACRO( name ) \
class name##P {       \
};
MACRO( cls )
void OnStart() {}

but otherwise

#define  MACRO( name ) \
class P##name {       \
};
MACRO( cls )
void OnStart() {}
fine. What's the difference?
 

Abstract compilation error: code generation error

void OnStart()
{
        Print( (string)NULL ); //code generation error
        Print( (long  )NULL ); //а так - нормально
}
 
That's right, you can't bring zero in like that. It's not safe.
 
The error is that the compiler does not specify where it occurs(__FILE__, __LINE__) and there is no transition as with most errors, making it difficult to find and fix
Reason: