Download MetaTrader 5
To add comments, please log in or register
Create Forum topics and improve your rating!
HongDi s& t development co.,ltd.
1529
hongbin fei 2012.01.01 17:19 

I donot know what is this error, can you help me?

Stephen Njuki
5147
Stephen Njuki 2012.01.01 18:53  
codeidea:

I donot know what is this error, can you help me?

 

 

Your code?
HongDi s& t development co.,ltd.
1529
hongbin fei 2012.01.02 15:20  

I have found the error, it is so STRANGE :

 bool              Check(const int BarId);

{ 
 ....
  Print(__FUNCTION__,BarId);
  Print(__FUNCTION__,"^^^^^^^^^^",BarId+1);
 .....
 }

2012.01.02 22:16:41 2010.11.02 11:51:40   candle_class::Check0

2012.01.02 22:16:41 2010.11.02 11:51:40   candle_class::Check^^^^^^^^^^-350469376

 

Why: 

BarId=0

BarId+1 =-350469376?

 

Stephen Njuki
5147
Stephen Njuki 2012.01.02 19:00  
codeidea:

I have found the error, it is so STRANGE :

2012.01.02 22:16:41 2010.11.02 11:51:40   candle_class::Check0

2012.01.02 22:16:41 2010.11.02 11:51:40   candle_class::Check^^^^^^^^^^-350469376

 

Why: 

BarId=0

BarId+1 =-350469376?

 

 

 

 

   void              Check(const int BarId)

{ 
 
  Print(__FUNCTION__,BarId);
  Print(__FUNCTION__,"^^^^^^^^^^",BarId+1);

 }

 

 

 

 

HongDi s& t development co.,ltd.
1529
hongbin fei 2012.01.03 05:11  
I dnot know why ?  I write software for 20 years , oh my god, I think the compiler has bug.
HongDi s& t development co.,ltd.
1529
hongbin fei 2012.01.07 09:32  

I have slove it,

 bool              Check(const int BarId);

{ 
 ....
  Print(__FUNCTION__,BarId);
 int x =BarId+1;
  Print(__FUNCTION__,"^^^^^^^^^^",x);
 .....
 }

 then all is ok.

/
To add comments, please log in or register