View Single Post
Old 08-26-2008, 10:35 PM   #1 (permalink)
MR2SUFI
 
Newb Techie

Join Date: Aug 2008

Posts: 13

MR2SUFI is on a distinguished road

Default Noob at C++, just looking for some beginner help.

I'm trying to learn some stuff in C++, ultimately be able to design things, such as games..etc.
I know that will be a LONG time from now, as there's already stuff I'm not understanding.
But just to get kick off the learning experience..I'm reading
a tutorial type thing online.

I've came across this part,

"n addition to decimal numbers (those that all of us are used to use every day) C++ allows the use as literal constants of octal numbers (base 8) and hexadecimal numbers (base 16). If we want to express an octal number we have to precede it with a 0 (zero character). And in order to express a hexadecimal number we have to precede it with the characters 0x (zero, x). For example, the following literal constants are all equivalent to each other:

75 // decimal
0113 // octal
0x4b // hexadecimal

All of these represent the same number: 75 (seventy-five) expressed as a base-10 numeral, octal numeral and hexadecimal numeral, respectively. "

I'm not understanding how..
0113 and 0x4b=75?
MR2SUFI is offline