Can type bool variables be assigned 0 in place of false and any integer in place of true?

Can type bool variables be assigned 0 in place of false and any integer in place of true?
Sorry if this is a stupid question.
Yes. Integers are convertible to bool in the way you have described.
You will have to cast, however, and then when casting it will give you a performance warning because it converts to 0 or 1 rather than 0 or whatever value you want.
Topic archived. No new replies allowed.