Quote Originally Posted by laserlight View Post
The problem is that strtok modifies the string. If you want to print the original string, then you should make a copy of it and use strtok on that copy.
Thanks! makes sense now. I didn't know that it modified the original string permanently.