FormatLiterals, declaration without type, TimeSpanFormat.mq

 

Hi

An EA which complied Ok before but after mql5 update it failed to compile with the error

'FormatLiterals' - declaration without type TimeSpanFormat.mqh

Any body else having this problem and how to fix it?

Thanks


 
Add "void" before the declaration.
 

I changed the line from

static FormatLiterals TimeSpanFormat::PositiveInvariantFormatLiterals = FormatLiterals::InitInvariant(false);

To

static void FormatLiterals TimeSpanFormat::PositiveInvariantFormatLiterals = FormatLiterals::InitInvariant(false);

but now I get the error 

'TimeSpanFormat' - semicolon expected TimeSpanFormat.mqh

And the cursor before the TimeSpanFormat.

any more suggestions?

Thanks


 
Post the code.
 
Alain Verleyen:
Post the code.

https://www.mql5.com/en/code/15242

he is reffering to this library and attached file has this issue

RegularExpressions in MQL5 for working with regular expressions
RegularExpressions in MQL5 for working with regular expressions
  • www.mql5.com
Note: The library works on the MetaTrader 5 build 1285 and higher. Unzip the archive into the terminal_data_folder. The library codes are located in the: \MQL5\Include\RegularExpressions\ Sample test scripts can be found in the \MQL5\Scripts\RegularExpressionsExamples\ Here is a translation of the RegularExpressions from .Net Framework 4.6.1...
Files:
 
Fixed.
Files:
 
Alain Verleyen:
Fixed.

let me check thank you

Reason: