Author |
Message |
tikiman Newbie
Joined: Jan 25 2003 Posts: 14 Offline
|
|
Back to top |
|
|
SOS Server Help Squatter
Joined: Dec 02 2002 Posts: 329 Offline
|
Posted: Wed Jan 29, 2003 11:39 pm Post subject: |
|
|
|
|
So the captlist is a _linkedlist<String*>? Hmm...
Well, I can't think of anything that can cause this :/
Did you run it through a debugger? _________________ 3y3 4m l33t h4x0r
j0! 3y3 4m t4lking to j00!
fux0red 5cr1pt k1dd13.
-"l33t h41ku" |
|
Back to top |
|
|
catid Guest
Offline
|
Posted: Thu Jan 30, 2003 5:54 pm Post subject: linkedlist |
|
|
|
|
_linkedlist <String> MyList;
MyList.append(new String("Hello"));
_listnode <String> *parse = MyList.head;
while (parse)
{
String *s = parse->item;
if (*s == "blah")
MyList.kill(parse);
parse = parse->next;
}
etc... |
|
Back to top |
|
|
SOS Server Help Squatter
Joined: Dec 02 2002 Posts: 329 Offline
|
Posted: Fri Jan 31, 2003 1:03 am Post subject: |
|
|
|
|
Actually caid, that would crash, lol
parse = parse->next; before the kill |
|
Back to top |
|
|
tikiman Newbie
Joined: Jan 25 2003 Posts: 14 Offline
|
Posted: Sat Feb 01, 2003 4:58 pm Post subject: |
|
|
|
|
Thanks catid, I wouldn't have thought to put the (new String("Hello")) as a parameter to the append function:)
I actually ended up using <PlayerTag> instead and just copied some of your code to do the kill(). But the post you made would have worked as well. |
|
Back to top |
|
|
catid Guest
Offline
|
Posted: Sat Feb 22, 2003 8:26 pm Post subject: oops! |
|
|
|
|
oops! Sorry =) |
|
Back to top |
|
|
VampZ Guest
Offline
|
Posted: Mon Feb 24, 2003 2:44 pm Post subject: |
|
|
|
|
wouldn't that crash too?
I'd think you would have to do:
_listnode tempNode = parse->next;
MyList.kill(parse);
parse = tempNode; |
|
Back to top |
|
|
VampZ Guest
Offline
|
Posted: Mon Feb 24, 2003 2:49 pm Post subject: |
|
|
|
|
err... and make sure you declare _listnode tempNode outside of the loop to prevent duplicate declarations of course. |
|
Back to top |
|
|
|