Download MetaTrader 5

Access violation error

To add comments, please log in or register
No time to learn MQL5? The source code library is at your service!
Mihai Ionescu
1289
Mihai Ionescu 2010.08.12 15:52 

First the code. I replicated the error with the code below.

Funny is that it worked sometimes with different values for double array. 

This is the code: 

double ratios[8] = {1.45,1.55,1.78,2.45,2.72,3.45,4.56,9.8};

void OnStart()
  {
//---
   for (int r=0;r<8;r++) {
      printf("frac(%f)=%f", ratios[r],MathFrac(ratios[r]));
   }
  }
  
double MathFrac(double d) {
   return (d-MathFloor(d));
} 
Alexey Da
Moderator
6605
Alexey Da 2010.08.12 16:27  

Thanks.

We will fix it as soon as possible. 

To add comments, please log in or register