Resizing array & lists
#5

I have an idea about workaround, if anyone needs it:

Код:
new array[200], pointer;
pointer = 0;

//adding member
array[pointer]=something
pointer = pointer + 1

//getting members
for (new i = 0;i < pointer;i++)
{
// do something
}
Idea is that instead of using sizeof, you can use another variable that will determine highest member. It's working on my server, but there are two main problems: memory usage can be high since you have to initialize large array and what to do if number of entries still exceeds array size.
Reply


Messages In This Thread
Resizing array & lists - by matejdro - 28.07.2010, 10:15
Re: Resizing array & lists - by Mauzen - 28.07.2010, 15:36
Re: Resizing array & lists - by matejdro - 28.07.2010, 17:17
Re: Resizing array & lists - by DJDhan - 28.07.2010, 17:19
Re: Resizing array & lists - by matejdro - 28.07.2010, 17:25

Forum Jump:


Users browsing this thread: 2 Guest(s)