Advertisement

probably a dumb question

Started by June 23, 2001 10:30 PM
1 comment, last by jharkey 23 years, 7 months ago
this sounds so stupid, but i need help understanding this #define SOME_CONSTANT 0x002 now, i understand what the define does and all that, but why do i see these type of numbers, the ones that start out with 0x? i''ve noticed they are used for special "system" things, like memory addresses and stuff. they aren''t hex are they? i thought all hex ended in h, like 0AFFh. anyway, i was just wondering.
Yes, they are hexadecimal. Different languages represent hex numbers in different ways; some use a ''0x'' prefix, and some use a ''h'' suffix.

~~~~~~~~~~
Martee
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
Advertisement
Some also put dollar sign infront of them.

$DEADBEEF

(For example ).
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall

This topic is closed to new replies.

Advertisement