c++ - Two equivalent if conditions give different results -




i encountered problem when developing project , don't know how proceed debug this. code is (_vtol_status.vtol_in_rw_mode true)

bool a;  if (_vtol_status.vtol_in_rw_mode == true){     = true; } else {     = false; }  bool b = true;  if (a == b) {/* print */}  if (a) {/* block of codes  */} 

i can see "something" printed true. block of codes doesn't give correct result. have made sure enters "if (a)".

however if change if condition to

if (b) {/* block of codes  */} 

then works well.

i have made sure variables "a" , "b" appear else in code.

how possible? have been struggling long time. issue might simple couldn't clue. appreciated.





wiki

Comments

Popular posts from this blog

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -

Asterisk AGI Python Script to Dialplan does not work -