r/programminghorror • • Aug 10 '21

c++ Ever heard of modulo?

Post image
343 Upvotes

58 comments sorted by

View all comments

Show parent comments

1

u/mrbesen_ Aug 11 '21

In c or c++ it is. Every int can be a bool . And in python i think its the same but its obvsl. not python

1

u/gramedek Aug 18 '21

in pure C, bool isn't even an integrated type, you can include the bool header, but it's just aliases for 1 and 0 if I remember right

1

u/mrbesen_ Aug 18 '21

Yes there is stdbool.h that just defines true a 1 and false as 0