Aren’t Boolean variables always false by default?

Talking about primitive built-in data types (bool, char, wchar_t, short, int, long, float, double, long double), according to C++ standard, only global variables get a default value of zero if they are not explicitly initialized.

For local variables it’s not required for the complier to clean up the content of the memory they are assigned to. A local variable — if not explicitly initialized — will contain an arbitrary value.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)