Download MetaTrader 5

How to pass object array parameter to function

To add comments, please log in or register
Launch agents on an idle PC. It is profitable!
Rako
10
Rako 2010.10.11 07:14 

     if i declare an object array variable, and  i want to pass it to a function as parameter, how to do it?

     such as: 

                MqlRates mrate[];

                void printRateArrayInfo(MqlRates mrate[]);

 

      how to do it?

                   

                    

Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / History Data Structure
  • www.mql5.com
Standard Constants, Enumerations and Structures / Data Structures / History Data Structure - Documentation on MQL5
Andrei Moraru
1157
Andrei Moraru 2010.10.11 10:59  

Via reference:

void printRateArrayInfo(MqlRates& mrate[])
{
}

printRateArrayInfo(mrate);

Rako
10
Rako 2010.10.11 12:38  
enivid:

Via reference:


    ok,now it works.thank u.
To add comments, please log in or register