E se fossi in te eviterei di mescolare codice C e codice C++, sia la STL sia la libreria Boost offrono degli ottimi strumenti per la tokenizzazione di stringhe (ed eventualmente per l'implementazione di parser).

Bruce Eckel's Thinking in C++, 2nd Ed

Some programmers consider strtok( ) to be the poorest design in the Standard C library because it uses a static buffer to hold its data between function calls. This means:

1. You can’t use strtok( ) in two places at the same time
2. You can’t use strtok( ) in a multithreaded program
3. You can’t use strtok( ) in a library that might be used in a multithreaded program
4. strtok( ) modifies the input sequence, which can produce unexpected side effects
5. strtok( ) depends on reading in “lines”, which means you need a buffer big enough for the longest line. This produces both wastefully-sized buffers, and lines longer than the “longest” line. This can also introduce security holes. (Notice that the buffer size problem was eliminated in WordList.cpp by using string input, but this required a cast so that strtok( ) could modify the data in the string – a dangerous approach for general-purpose programming).

For all these reasons it seems like a good idea to find an alternative for strtok( )