on-internet
← Community

Better way to convert an int to a boolean

Stack Overflow ·

The input int value only consist out of 1 or 0. I can solve the problem by writing a if else statement. Isn't there a way to cast the int into a boolean?

Comments

Sign in or sign up to comment and upvote.

No comments yet.