Quote Originally Posted by laserlight View Post
you would have to add a null character to the end in order to use &str[0] with strtok().
which brings me back to using strncpy() to copy to a buffer allocated on the heap, and when I run a loop ahead of the strtok() call to determine the number of elements (I'm only using a single character as a delimiter anyway), and reserve space in the vector in which the results are stored, the difference in performance is negligible between strtok() and std::getline().