Hi all,
I'm using strtok to tokenise a string, e.g. "1;2;3;4;5" using ";" as the delimiter.
What I want is to say: int i = strtok( myString, ";" )
...but I obviously can't do that. If I cast the result of strtok as an int it doesn't give the result I want.
So the question is, how can I turn the results of strtok e.g. "1" into an int, 1 ???
Hope that makes some sense,
Gus
I'm using strtok to tokenise a string, e.g. "1;2;3;4;5" using ";" as the delimiter.
What I want is to say: int i = strtok( myString, ";" )
...but I obviously can't do that. If I cast the result of strtok as an int it doesn't give the result I want.
So the question is, how can I turn the results of strtok e.g. "1" into an int, 1 ???
Hope that makes some sense,
Gus