Download MetaTrader 5
To add comments, please log in or register
Having questions? Ask them on the Forum - traders will help you!
yreid
11
yreid 2015.10.17 15:18 

Hi,

Why do I get this compile error with the ArrayFill function? 

ArrayResize and  ArraySize have no issue with the type. 

***

Compile error (1sr parameter of ArrayFill in bellow code) :

Error: 'Orders' - type mismatch 

***

Order is a normal class.

void Test() {

   Order *Orders[];
   Order *pOrder = new Order();

   ArrayResize(Orders, ArraySize(Orders) + 1);
   ArrayFill(Orders, ArraySize(Orders) - 1, 1, pOrder);
}


whroeder1
13619
whroeder1 2015.10.17 18:27  
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. ArrayFill - MQL4 Documentation

    array[]

    [out]  Array of simple type (char, uchar, short, ushort, int, uint, long, ulong, bool, color, datetime, float, double).

    Where do you see you can use an array of pointers ?
/
To add comments, please log in or register