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?
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?