I had declared a Boolean variable bool abc; in a class and thought that it would be false by default. An if condition in my program, if (abc),
bool abc;
if (abc)
Only global variables are assigned 0 (false) by default. Any local variables are given a non-zero garbage value, which would evaluate to true in a boolean variable.