-
Play videoPlease edit your post.
For large amounts of code, attach it.
This is babel. You define parameters as TYPE [&] NAME; struct is not a type. Order(struct & params){ ...
Try struct values{ int i; double d; }; : Order(values& params){ ... params.i ...
ah I see! This is a great help. thanks.
hey,
just to clear some things up; what you are after is not about C but about C++. C has not classes or objects so maybe it is a reason why you are not finding anything usefull while searching on the internet
best regards

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
/+------------------------------------------------------------------+
Hi Guys/Girls
Wasn't sure where to post this. I need some help with trying to pass a struct to a constructor.
Passing each individual param is tedious and not very maintainable.
So I want to pass a key value pair object to the constructor. Unfortunately I am getting - struct cannot be defined in param list. I am a total n00b at C and this is my first MetaQuotes4 programme(EA) attempt. I have Googled and trawled the docs. Can't find a thing besides the docs saying that passing classes, arrays and structs can only be done using pass by reference.
The issue is line 10.
I also attached the full file - it's loaded with compile errors - due to this being a WIP. The rest of the errors I can handle but the struct not allowed in params issue has be baffled. Any help or advice would be awesome.
Thanks in advance.