23.02.2009, 15:01
Use this version of strtok :
just change the new ret[128] to a lower if you want. I'd keep it like this, and replace your tmp[256] with tmp[128] and should compile well..
- X Cutter
Код:
stock strtok(string[],&idx,seperator = ' ')
{
new ret[128], i = 0, len = strlen(string);
while(string[idx] == seperator && idx < len) idx++;
while(string[idx] != seperator && idx < len)
{
ret[i] = string[idx];
i++;
idx++;
}
while(string[idx] == seperator && idx < len) idx++;
return ret;
}
- X Cutter

