see article https://www.mql5.com/en/articles/36
Using the Object Pointers in MQL5
- 2010.04.16
- MetaQuotes Software Corp.
- www.mql5.com
By default, all objects in MQL5 are passed by reference, but there is a possibility to use the object pointers. However it's necessary to perform the pointer checking, because the object may be not initialized. In this case, the MQL5 program will be terminated with critical error and unloaded. The objects, created automatically, doesn't cause such an error, so in this sence, they are quite safe. In this article, we will try to understand the difference between the object reference and object pointer, and consider how to write secure code, that uses the pointers.
kajasi:
I can't find the place where the " * " is explained .
e.g.
CTetrisShape *m_shape; // Tetris figure
What is the difference to the same code but without the star:
CTetrisShape m_shape; // Tetris figure
Thanks a lot for your help!
Documentation on MQL5: Language Basics / Data Types / Object Pointers
- www.mql5.com
Language Basics / Data Types / Object Pointers - Documentation on MQL5
Sometimes I find it very frustrating that a person cannot just say, the * represents this, rather like > means greater than, its all well and good if you can uderstand an incomprehensible language !! but then again, the power is in the hands of the programmer, had similar problem before and the help has been poor
Rob
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
I can't find the place where the " * " is explained .
e.g.
CTetrisShape *m_shape; // Tetris figure
What is the difference to the same code but without the star:
CTetrisShape m_shape; // Tetris figure
Thanks a lot for your help!