View Single Post
  #7   Spotlight this post!  
Unread 18-06-2002, 17:54
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
Assuming you're talking about the C programming language (and probably several others actually), an array isn't just a list of pointers. Instead an array is simply a single pointer. When you combine a pointer with an offset (ie the array index), you can point to any specific value in the array. Now as to, arrays of pointers, they do have a use. Unfortunately in this case, using an array of pointers wouldn't help. On most systems, integers and pointers are the same size (in bits). Therefore an array of 2000 integers takes up the same amount of space as 2000 pointers. Given that there needs to be space to allocate what the pointers are pointing too, it's less efficient to do the array.

As far as whether an array of 2000 integers takes up a lot of space, I'd have to say it doesn't as it's merely 8 kilobytes of space which is not much at all compared to what computers support.