Download MetaTrader 5
To add comments, please log in or register
You can test an application before buying it. Find out how to do that!
Richard
76
Richard 2014.03.01 12:24 

I am converting a build 509 indicator to 610 and am getting the error: "arrays are passed by reference only" for lpRect in GetClientRect. How can I fix it?

int GetClientRect(int hWnd,int lpRect[]);

Carl Schreiber
5962
Carl Schreiber 2014.03.01 12:49  
rwbta:

I am converting a build 509 indicator to 610 and am getting the error: "arrays are passed by reference only" for lpRect in GetClientRect. How can I fix it?

int GetClientRect(int hWnd,int lpRect[]);


You can't fix that - it's a new feature (no alternative - as far as I know)!

What you get is a warning not an error!

Be clear by changing you code:

int GetClientRect(int hWnd,int& lpRect[]);
whroeder1
13644
whroeder1 2014.03.01 12:50  
rwbta: "arrays are passed by reference only" for lpRect in GetClientRect. How can I fix it?

int GetClientRect(int hWnd,int lpRect[]);

So pass the array by reference
int GetClientRect(int hWnd,int &lpRect[]);
Richard
76
Richard 2014.03.01 14:02  
gooly:

You can't fix that - it's a new feature (no alternative - as far as I know)!

What you get is a warning not an error!

Be clear by changing you code:


It is an error in my 610 version of MetaEditor. Changing the code does fix it; so there is a fix. You sound as frustrated by the new version as I am.
Richard
76
Richard 2014.03.01 14:04  
WHRoeder:
So pass the array by reference

Thank you for the clarification. All is well with the world again; until the next new feature ;-).
joi
89
joi 2014.05.20 20:04  
Hi, how to pass Arrays to a DLL? DLL do not allow (and is not able) to pass anything by reference.
whroeder1
13644
whroeder1 2014.05.20 20:58  
joi: how to pass Arrays to a DLL? DLL do not allow (and is not able) to pass anything by reference.
Mql4=reference c++=pointer
/
To add comments, please log in or register