Alright... I've read that arrays are one of the most usefull items in programming... my question is WHY???
Let me explain, I can see why a list of items can be benefitial, but I've never found a good use for one. Is this due to my inexperience or a few twisted wires upstairs? The reason I have never found a use for one is because they seem clumsy and inflexible. Say for example, you have a program to store contacts. If you count all your contacts and then create an array for fast searching, what happens when you need to add one more? or delete one? The array you have created is now either not big enough or too big and wasting memory.
Maybe this is a bad example. If so and arrays are really usefull, can someone provide me an example or explanation? Stacks, hashmaps/tables, etc seem like very useful tools. They grow, they shrink. Any ideas?
Thanks,
Andrew
"God is a comedian playing to an audience too afraid to laugh."
-- Francois Marie Arouet (Voltaire)
Let me explain, I can see why a list of items can be benefitial, but I've never found a good use for one. Is this due to my inexperience or a few twisted wires upstairs? The reason I have never found a use for one is because they seem clumsy and inflexible. Say for example, you have a program to store contacts. If you count all your contacts and then create an array for fast searching, what happens when you need to add one more? or delete one? The array you have created is now either not big enough or too big and wasting memory.
Maybe this is a bad example. If so and arrays are really usefull, can someone provide me an example or explanation? Stacks, hashmaps/tables, etc seem like very useful tools. They grow, they shrink. Any ideas?
Thanks,
Andrew
"God is a comedian playing to an audience too afraid to laugh."
-- Francois Marie Arouet (Voltaire)