how to slove - OnTimer critical error

 
codeidea:

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

 

 

Your code?
 

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?

 

 
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);

 }

 

 

 

 

 
I dnot know why ?  I write software for 20 years , oh my god, I think the compiler has bug.
 

I have slove it,

 bool              Check(const int BarId);

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

 then all is ok.