10
Yes, as others have said bools can be compared for equality in C++. You may be thinking of things you heard from C. Since C has no bool type, booleans are represented as integers. In a boolean context any non-zero integer is true. However, they might have different bit patterns and thus not be equal. So the rule in C was not to compare 'booleans'.
Edit: per comments, C99 has a bool type. However the point of the answer was to indicate why the idea of not comparing bools is floating around. It is based on the long history of C, prior to C99.