Why not simply test it and find out?
Part of the fun of learning is to test things out and figure out how they work.
MQL5: Added automatic generation of an implicit copy operator for the objects of structures and classes. Now, the compiler automatically creates copy operators, which allows writing simple entries for objects, such as b=a:
MetaTrader 5 Platform Beta Build 1625: Custom financial instruments - Stock Option Trading Strategies - General - MQL5 programming forum№ 8 2017.06.29
Note that we did not have to overload the assignment operator "=", as structures of simple types can be directly copied one into each other. Thus, we can now write a code for calculations involving complex numbers in the usual manner.
Language Basics / Functions / Operation Overloading - Reference on algorithmic/automated trading language for MetaTrader 5
Operation Overloading - Functions - Language Basics - MQL4 Reference
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
In MQL4, consider code below:
After this, I assume that B's m_state value will be 0, and A's m_state will be 3. Am I correct in my assumption ?