Download MetaTrader 5

Buggy constructor's behavior on MT4 build 880

To add comments, please log in or register
No time to learn MQL5? The source code library is at your service!
minimax2000
93
minimax2000 2015.09.20 01:08 

I got recent update of MT4 build 880 and MetaEditor build 1173.

I think I found a bug on class constructor's behavior.

class Cls
{
public:
        Cls(const Cls* ptr) { Print(ptr == NULL); }
};

Cls c(NULL);    // Print result is "false" because 'ptr' is a bad pointer.
Amir Yacoby
1192
Amir Yacoby 2015.09.20 10:58  
try this:

Cls c((Cls*)NULL);    // Print result is "false" because 'ptr' is a bad pointer.
minimax2000
93
minimax2000 2015.10.04 14:09  
amir_avatar:
try this:

Thanks. The problem has been solved by Build 890 update.
To add comments, please log in or register