Download MetaTrader 5

What is the meaning of "*" - the star?

To add comments, please log in or register
Sell your applications via the Market. It is secure!
Ali Kajasi
32
Ali Kajasi 2011.03.07 20:47 

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!

Amir Yacoby
1195
Amir Yacoby 2011.03.08 02:56  
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.
Alexey Da
Moderator
6606
Alexey Da 2011.03.08 12:48  
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!

https://www.mql5.com/en/docs/basis/types/object_pointers

Documentation on MQL5: Language Basics / Data Types / Object Pointers
  • www.mql5.com
Language Basics / Data Types / Object Pointers - Documentation on MQL5
Rob Cain
600
Rob Cain 2011.03.10 23:15  

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


To add comments, please log in or register