|
-
Nov 12th, 1999, 11:54 AM
#1
Thread Starter
New Member
What is the simplest way to remove an element from an array?
So far, the best solution I have found is to use a dynamic array; then, swap the used element, with the last element of the array, and redim the array to one less upper bound (effectively destroying that last, already used element). Is there a more elegant solution?
-
Nov 12th, 1999, 08:09 PM
#2
Junior Member
This is the only way I have done it. But if you want an exercise you could write your on class which could contain this type of coding but do it behind the scenes as you implement methods such as add, insert, delete,...
------------------
Brad
-
Nov 12th, 1999, 10:36 PM
#3
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|