correct should be
testclass * newobj = new testclass();
...
delete newobject;
Finally trying to look into new MQL5 language.
As far as being onject-oriented it's like going back in time about maybe 20 years back.
But on the more concrete note: Right away I am stumped... What's wrong here?
class testclass
{};
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
testclass newobj = new testclass;
}
'TestObject.mq5' TestObject.mq5 1 1
'new' - type mismatch TestObject.mq5 18 21
illegal operation use 1 1
2 error(s), 0 warning(s) 1 1

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Finally trying to look into new MQL5 language.
As far as being onject-oriented it's like going back in time about maybe 20 years back.
But on the more concrete note: Right away I am stumped... What's wrong here?
class testclass
{};
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
testclass newobj = new testclass;
}
'TestObject.mq5' TestObject.mq5 1 1
'new' - type mismatch TestObject.mq5 18 21
illegal operation use 1 1
2 error(s), 0 warning(s) 1 1