function must have a body, but it is constructor

 

Dear Community,

i have a problem with my signal-class:

class CSignal_ATR_Alex : public CExpertSignal{

   public:
          CSignal_ATR_Alex();
         ~CSignal_ATR_Alex();

   ...
   ...

}

 

when I try to use this Signal in my Expert Advisor by creation of this Class:

   CSignal_ATR_Alex *signal = new CSignal_ATR_Alex;

Then I get the following error:  'CSignal_ATR_Alex' - function must have a body Signal_ATR_Alex.mqh    31 11

 '~CSignal_ATR_Alex' - function must have a body Signal_ATR_Alex.mqh 32 11


Do somebody know, why I get this. The constructor must not have a body or is this wrong?

Thank you very much! 

 
It looks like your class CSignal_ATR_Alex does not have default constructor. See https://www.mql5.com/en/docs/basis/types/classes#default_constructor
Documentation on MQL5: Language Basics / Data Types / Structures and Classes
  • www.mql5.com
Language Basics / Data Types / Structures and Classes - Documentation on MQL5
 
Alain Verleyen:


I intend to use the Getlocaltime() Function for Milliseconds Time


but I keep getting the error --> GetLocalTime' - function must have a body EA_EURGBP_imaline_V14.mq4 17 6


this is how I declare


#import "kernel32.dll"

#import "stdlib.ex4"

#include <Arrays\List.mqh>


void GetLocalTime(int& TimeArray[]);

void GetSystemTime(int& TimeArray[]);

int  GetTimeZoneInformation(int& TZInfoArray[]);


.

.

.

.



void OnTick()

  {

  int jj, kk, luk_;

  int TimeArray[4];

  int tickCount;

  double Bid_=SymbolInfoDouble(Symbol(),SYMBOL_BID);

  double Ask_=SymbolInfoDouble(Symbol(),SYMBOL_ASK);

  int nYear,nMonth,nDay,nHour,nMin,nSec,nMilliSec;

  GetLocalTime(TimeArray);

         //Print("Line 136 ,",file_handle,",",GetLastError());

         nYear=TimeArray[0]&0x0000FFFF;

         nMonth=TimeArray[0]>>16;

         nDay=TimeArray[1]>>16;

         nHour=TimeArray[2]&0x0000FFFF;

         nMin=TimeArray[2]>>16;

         nSec=TimeArray[3]&0x0000FFFF;

         nMilliSec=TimeArray[3]>>16;

.

.

.

 }


Reason: