Download MetaTrader 5

ArrayFill compile error

To add comments, please log in or register
yreid 2015.10.17 15:18 


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 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


    [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