• Welcome to Valhalla Legends Archive.
 

Flame the noob day!

Started by j0k3r, July 02, 2003, 02:36 PM

Previous topic - Next topic

j0k3r

QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

JoeCool

if its "C++ For Dummies" it doesnt really mean its for idiots.. it just means it explains it really thuroly.. for people that wont get it in a normal book that just started C++

j0k3r

Wow man this is getting harder...

1. Someone help me with hex... How do you convert hex to numbers (multiply the digits by 16 and add the letters?) and numbers to hex (don't get this one at all)? I sort of have it figured out by doing it through binary but I'd rather know how to do it normally.

2. Are pointers used very often in C++ (how long do I have to make my brain hurt to understand this enough)?

3. If it won't take long, can someone enlighten me on memory location things (0x123456, etc)?
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

Eibro

Quote from: j0k3r on July 19, 2003, 07:44 PM
Wow man this is getting harder...

1. Someone help me with hex... How do you convert hex to numbers (multiply the digits by 16 and add the letters?) and numbers to hex (don't get this one at all)? I sort of have it figured out by doing it through binary but I'd rather know how to do it normally.

2. Are pointers used very often in C++ (how long do I have to make my brain hurt to understand this enough)?

3. If it won't take long, can someone enlighten me on memory location things (0x123456, etc)?
1) Do you mean convert hexadecimal to decimal? You really don't need to do this much on the fly (you could use the windows calculator, too) but, here: http://www.permadi.com/tutorial/numHexToDec/

2) Yes, they are. I know how you feel; I had no understanding of computer architecture/memory addressing when I started C++, so it was hard for me to understand as well. If you don't see a use for them right now, I wouldn't worry about it too much. I'm sure you'll come across them sooner or later.

3) This is a pretty broad topic. What do you want to know?
Eibro of Yeti Lovers.

j0k3r

Thanks for the link Eibro it cleared up everything, and I guess I'll just read through pointers and attempt to understand but not spend much time for now.

As for the memory thing...
1. What does 0x have to do with it? Is it just there to tell you it's referring to memory? Is there such thing as 1x?

2. Is the range affected by how much RAM you have (I'm going out on a limb here assuming it pertains to RAM)?
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

Eibro

1) If you ever see 0x infront of a number, it doesn't necessarily mean it's referring to a memory address. It simply means the number is expressed in hexadecimal. You'll also see hexadecimal numbers written with an upper or lowercase h prepended or appended to the number (although not in C/C++) 0xBADF00D == HBADF00D == BADF00Dh it's all just another way of saying the same thing. Also, there's no such thing as 1x :)

2) Now that that's cleared up, it adds a little ambiguity to the next question; the range of what?
Eibro of Yeti Lovers.

iago

The operating system allocates you ram for your program.  When you refer to an address in the program (say, 0xbadf00d), it's generally referring to somewhere in your ram, but there's no way of knowing where.  The operating system takes care of that for you so you never know where it is.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Camel

Quote from: iago on July 19, 2003, 09:29 PMbut there's no way of knowing where.

There's no practical way of knowing where.  ;D
Even if you did know where the data was, it would be fairly useless information as memory can be manipulated by other, much simpler, means through the operating system.

j0k3r

Alright that cleared alot too, thanks.
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo