T
Tydr Schnubbis
Is there a "C++ way" of doing what strtok() does, or should I just
convert string objects into char arrays and use strtok()? I couldn't
find a C++ way that is as straight forward as using strtok().
Would the following be considered "good" C++ style?
s = strtok(line.c_str(), " \t\n");
while (s) {
/* use s here */
s = strtok(NULL, " \t\n");
}
convert string objects into char arrays and use strtok()? I couldn't
find a C++ way that is as straight forward as using strtok().
Would the following be considered "good" C++ style?
s = strtok(line.c_str(), " \t\n");
while (s) {
/* use s here */
s = strtok(NULL, " \t\n");
}