Pedro Bernardes:
Hello people,
Basically, I'm trying to wrap the DatabaseReadBind function https://www.mql5.com/en/docs/database/databasereadbind
But I can't figure out a way of defining a function (actually, instance method) that accepts as void &something (as DatabaseReadBind does).
Without wrapping, works fine:
Wrapping in a method, breaks:
Errors:
Kinda unrelated but my intention is to wrap "error catching" code as on SQL errors the tester just say stuff like "database error, no such column: IND" with 0 hints on where to find it. Any help? What am I missing? Thanks, everybody!
You can't do that with struct in MQL.
Use template functions or classes.
Bummer,
thanks!

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello people,
Basically, I'm trying to wrap the DatabaseReadBind function https://www.mql5.com/en/docs/database/databasereadbind
But I can't figure out a way of defining a function (actually, instance method) that accepts as void &something (as DatabaseReadBind does).
Without wrapping, works fine:
Wrapping in a method, breaks:
Errors:
Kinda unrelated but my intention is to wrap "error catching" code as on SQL errors the tester just say stuff like "database error, no such column: IND" with 0 hints on where to find it. Any help? What am I missing? Thanks, everybody!