Hi,
I'm just pondering what operator new in MQL5 is for if i can't use it to allocate dynamic array?
Could u tell me examples when should i use pointer and operator new to create object instead create local variable?
For example if i have class like this:
class myClass{};
when should i do:
myClass* ptr_to_obj_of_my_class = new myClass; //dynamic variable
and when just:
myClass my_class; //local variable
?
thanks in advance!
I'm just pondering what operator new in MQL5 is for if i can't use it to allocate dynamic array?
Could u tell me examples when should i use pointer and operator new to create object instead create local variable?
For example if i have class like this:
class myClass{};
when should i do:
myClass* ptr_to_obj_of_my_class = new myClass; //dynamic variable
and when just:
myClass my_class; //local variable
?
thanks in advance!