Download MetaTrader 5

Access violation error

To add comments, please log in or register
Mihai Ionescu
1505
Mihai Ionescu  

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
6601
Alexey Da  

Thanks.

We will fix it as soon as possible. 

To add comments, please log in or register