Hi Thomas,
Pointers do use a little bit of memory, the word size of the particular
platform to be more precise. So a pointer on a 32 bit platform takes up 32
bits of memory (e.g. 4 bytes), in order to store the memory address of the
location which is being pointed to.
Kind regards,
Philip Bennefall
----- Original Message -----
From: "Thomas Ward" <thomasward1...@gmail.com>
To: "Gamers Discussion list" <gamers@audyssey.org>
Sent: Wednesday, December 16, 2009 3:12 AM
Subject: Re: [Audyssey] To Philip on C++
Hi Damien,
I guess some times it is kind of a hard concept to get across once you
have been so use to the way Visual Basic does things. However, some
things are pretty obvious if you think about it. Like if you wanted to
know if you needed to use a short or long integer.
Take a game like Troopenum. In the game after 5 ships lands game over.
Well, you don't need a lot of memory to store the numbers 0 through 5 so
a short integer would be practical here, and you only use something like
2 byts to keep that variable in memory. Now, if you want to keep track
of scoring that can be in the hundred thousands you obviously need more
memory to store that big a number so a long integer would be used.
Instead of 2 byts you now have reserved 4 byts for that variable. That
much makes sense to you i'm sure.
Pointers are exactly what the name implies. it points to some specific
data already in memory. Kind of like a reference card that tells you on
what stack, shelf, and isle a book can be located in the public library.
Instead of books pointers keep track of certain data on file in your
computer's memory, and can reference it for you when you call that
pointer. As I recall unlike variables pointers don't actually use memory
themselves but references some data already in memory rather than
creating a block of memory and storing it there.
HTH
Damien C. Sadler wrote:
Hi Thomas,
Memory management is exactly the sort of thing I do find difficult.
Like I say. When and how pointers and memory works is a mystery to me,
even though people have attempted to explain it to me.
Regards,
Damien.
---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to
gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the
list,
please send E-mail to gamers-ow...@audyssey.org.
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.427 / Virus Database: 270.14.108/2565 - Release Date: 12/14/09
19:40:00
---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.