Original Post
How to specify in binary in C++ just like using the 0x to specify hex. In addtion, how to read single bits from a data item, say from an long or a file?
Quote:
Original post by Simplicity
How to specify in binary in C++ just like using the 0x to specify hex. In addtion, how to read single bits from a data item, say from an long or a file?
Quote:
Original post by iMalc
Impressive Polymorphic OOP!
I can certainly see why it stops at allowing at most 8 bit groupings! Though it would help enforce good style anyway, as it looks better with appropriate whitespace. Obviously that header file is largely generated by some other code.
Quote:
Original post by iMalc
Seriously though, I think every programmer should just learn hexadecimal and the conversion to/from binary. Write your constant in hex, with the equivalent binary in a comment if you like.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more