Computer Science Canada Deleting elements in an array |
| Author: | tum_twish [ Thu Jun 05, 2003 10:35 am ] |
| Post subject: | Deleting elements in an array |
Is it possible to delete an element (parition)of an array (ie. make it no value) given the index (subscript) of the element? |
|
| Author: | Martin [ Thu Jun 05, 2003 10:49 am ] |
| Post subject: | |
Nope. Just set it to a flag value that you know isn't going to be used, or use linked lists |
|
| Author: | tum_twish [ Thu Jun 05, 2003 10:53 am ] |
| Post subject: | |
what r linked lists? |
|
| Author: | Martin [ Thu Jun 05, 2003 10:57 am ] | ||||
| Post subject: | |||||
It's a really efficient way to store data. Basically you have a pointer to the first memory location of a record, and then each subsequent record has a pointer to the next one in line
you then have a variable
|
|||||
| Author: | Blade [ Thu Jun 05, 2003 11:19 am ] |
| Post subject: | |
i kinda thought he was talking about flexible arrays.. |
|
| Author: | PaddyLong [ Thu Jun 05, 2003 4:17 pm ] |
| Post subject: | |
flexible arrays wouldn't really work... they just resize the array, not reset it... |
|