Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Why can't I use int instead of bool
Why can't I use int instead of bool
Bool has only two values, true and false, namely 0 and 1.

Int is an integer.

First, 1 written by bool is true and 0 is false, which is easy to identify.

Secondly, bool takes up very little byte space, which saves a lot of space compared with int.

Then came the Boolean type. I remember it was newly added in the c99 standard, but it will also be used.