> On Sat, 4 Oct 1997, Andrew Helm wrote:
>
> Okay, what I mean is.. I have an array in the pfile.. int memorized[100];
> which stores spellnums, if they forget a spell, I want it to set the
> spellnum to 0, and if there is a 0 in the array, I want it to move all
> entries to the left one after the zero, so there are no more zeros until
> the end of the array
> i.e.
> 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 5
> would equal this:
> 1, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Why not have a dynamic array, or linked list? This way, you're not
wasting valuable memory with those '0' values. Just a thought.
Whitey
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST