MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
Update to MetaTrader 4 build 735 and Test the VPS for Free

Function and Array

Back to topics list To post a new topic, please log in or register
avatar
33
ukalgo 2009.10.17 18:33
 

Hi,

I would like to create a function where I use some arrays, and Integer as imputs and the output is the average.

How to define the function ?



int ArrayAverage( double array[][], int toto)
{
}


or

int ArrayAverage( double array, int toto)
{
}


Thanks you guys for your help


UKALGO

 
The ECB entering the corporate bond market
The ECB entering the corporate bond market
PCWalker | 22 October 2014, 18:50 | Views: 40
Market movers today Main release will be US CPI for September.Inflation has been subdued in the past months with monthly changes in core CPI being low. However, the flat reading m/m last month was partly due to some one-off factors and core CPI is expected to have risen,... Selected market news US stocks followed the strong European session with the S&P500 extending its four-day rally to more than 4.
avatar
33
ukalgo 2009.10.18 23:55 #
 
no answer ???
avatar
113
circlesquares 2009.10.19 00:21 #
 

Are you asking how to pass an array into a function? the first one will let you pass a 2 dim array. the second one needs the brackets [] for a 1 dim array.

 
avatar
33
ukalgo 2009.10.21 01:30 #
 
circlesquares:

Are you asking how to pass an array into a function? the first one will let you pass a 2 dim array. the second one needs the brackets [] for a 1 dim array.

Thanks for your help,


I imagine i has to but the dimension or not on this array in the function definition ?


Thank you for your help !


Regards


UKALGO

 
Back to topics list  

To add comments, please log in or register