cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
base 16 macro definitions
base 16 macro definitions
Feb 17, 2009 at 12:31pm UTC
Tom Backton
(119)
Sometimes I see header files in which macro definitions use base 16 numbers even when it doesn't seem to matter. Is there a particular reason for this? (maybe easier adaptation of the numbers to hardware input control bits? )
Feb 17, 2009 at 12:57pm UTC
Bazzy
(6281)
Two hexadecimal digits are equal to a byte
And being 16 = 2
4
using hex is simpler when working with flags
http://www.cplusplus.com/doc/hex.html
Last edited on
Feb 17, 2009 at 12:58pm UTC
Feb 18, 2009 at 6:15am UTC
Tom Backton
(119)
That's what I thought...thanks.
Topic archived. No new replies allowed.