This above code works correctly in MQL5 but in MQL4 creates a compile error : '=' - structure have objects and cannot be copied
Even if i inheritance the class CObject into the TestClass creates another compile error : '=' - not allowed for objects with protected members or inheritance
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi all,
Inside a script i use the following code :
This above code works correctly in MQL5 but in MQL4 creates a compile error : '=' - structure have objects and cannot be copied
Even if i inheritance the class CObject into the TestClass creates another compile error : '=' - not allowed for objects with protected members or inheritance
Example with CObject inheritance :
Even if i replace the string property with int the compile error still exist.
In this example i don't want to use POINTER_DYNAMIC to solve the issue.
Why that happens only on MQL4 ? Can be solved without using pointers ? Please advise.
Thanks in advance!