By convention an array must be passed by reference, and is indicated with brackets []. So, the function prototype needs to look like this:
void signalRead(signal& buffer[])
A declaration like yours
void signalRead(signal& buffer)
would mean buffer is a single signal struct, passed by reference, hence the error.
By convention an array must be passed by reference, and is indicated with brackets []. So, the function prototype needs to look like this:
A declaration like yours
would mean buffer is a single signal struct, passed by reference, hence the error.
By convention an array must be passed by reference, and is indicated with brackets []. So, the function prototype needs to look like this:
A declaration like yours
would mean buffer is a single signal struct, passed by reference, hence the error.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
ArrayResize(buffer,parts);
with the error buffer - parameter conversion not allowed when I try to pass an array of structures by reference to a function signalRead
But the code works fine if I declare signal buffer[] inside the function signalRead
WORKS!
Why do I get an error when I pass an array of structures by reference please explain?