Hello,
When using a parametric constructor, what is your way of validating the constructor finished ok and the parameters satisfy the class business terms?
A constructor has no return parameters, how do you check if it finished ok and in case it didn't, what do you do?
If you don't use an Initialize method, can you think of a nice way to handle success or failure of such class initiailization?
thx (:
- Talking about the PLO in the lounge
- instantiate objects from an array
- Errors, bugs, questions
In C++ you'd throw an exception, can't in Mt4. Either save a status and return it in a IsValid method, or use SetUserError/ResetLastError - MQL4 Documentation
Thanks WHRoeder, nice answer
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