MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/siwf1k/oh_hey_its_more_of_my_code/hvcyues/
r/badcode • u/[deleted] • Feb 02 '22
95 comments sorted by
View all comments
Show parent comment
3
What environment normally stores integers as a byte? Yes, it is never a “bit” as that isn’t addressable. More typically the machine’s word size, 32 bit, or the min(32, word size)…
10 u/[deleted] Feb 03 '22 Let's all be thankful that bit-endianess is generally only a headache of hardware developers. 1 u/Dumfing Feb 03 '22 And audio developers, and network developers 1 u/[deleted] Feb 03 '22 C++ stores booleans as a byte 6 u/RFC793 Feb 03 '22 Your comment originally said “ints” and you changed it to “booleans” after my reply.But, yes, bool in C++ is explicitly defined as one byte.
10
Let's all be thankful that bit-endianess is generally only a headache of hardware developers.
1 u/Dumfing Feb 03 '22 And audio developers, and network developers
1
And audio developers, and network developers
C++ stores booleans as a byte
6 u/RFC793 Feb 03 '22 Your comment originally said “ints” and you changed it to “booleans” after my reply.But, yes, bool in C++ is explicitly defined as one byte.
6
Your comment originally said “ints” and you changed it to “booleans” after my reply.
But, yes, bool in C++ is explicitly defined as one byte.
View all comments
Show parent comment
3
u/RFC793 Feb 03 '22
What environment normally stores integers as a byte? Yes, it is never a “bit” as that isn’t addressable. More typically the machine’s word size, 32 bit, or the min(32, word size)…