arrays are passed by reference only error

 

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[]);

 
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[]);
 
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[]);
 
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.
 
WHRoeder:
So pass the array by reference

Thank you for the clarification. All is well with the world again; until the next new feature ;-).
 
Hi, how to pass Arrays to a DLL? DLL do not allow (and is not able) to pass anything by reference.
 
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
Reason: