It is recommended that you use something as an alternate to strtok() since it destroys the string... Try writing something on your own : ) it might be a good excercise for you.