I want to make sure variable live scope by check they use the same address.
Want print out address that indicate use the extern int XXX variable. and in EA int XXX variable.
GetPointer is use for class. IF some other ways I can do? Or some doc relative icustom indicator input/output data .
Ya Thanks. https://www.mql5.com/en/docs/common/getpointer
I think my question is about "confuse why MQL define this way? There is pointer
for object, and struct use POINTER_AUTOMATIC
It's look like MQL
I guess there are some hiding thinking.Object
has life scope issue. Struct don't have ,so for more easy to maintain ,just make it automatic. In
the first month ,I thought pointer is always automatic , I don't need take care about it. After touch object new and delete. It's look like RD
need define the life scope,ther is no garbage
class objects have pointers. Instances of structures and
simple-type variables can't have pointers. The class object not created using the new() operator, but, e.g., automatically created in the
array of objects, still has a pointer. But this pointer will be of the automatic type POINTER_AUTOMATIC, therefore the delete() operator
can't be applied to it. Aside from that, the type pointer doesn't differ from dynamic pointers of the POINTER_AUTOMATIC type.
variables of structure types and simple types do not have pointers, it's prohibited to apply the GetPointer() function to them. It's also
prohibited to pass the pointer as a function argument. In all these cases the compiler will notify an error.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.