I think this should rather be a backslash (
If it was a forward slash (
/) I’d agree that it would not make sense.
But if it in fact is a back slash the delimiter string would be looking like this
"\"~" and means that
strtok() should break the string at each occurence of either a double quote (
") or a tilde (
~). But the thing is, how do you write a double quote inside a string that is wrapped in double quotes without actually ending the string?
That is where “escaping” comes into play. That backslash tells the compiler that the character that follows has a special meaning and hence should be treated differently than normal (i.e. “don’t break the string here but embed the double quote”).
If you look at the code hilighting of the following three statements you might get the picture
char goodString = "double quote \" escaped"; // everything red is part of the string
char badString1 = "double quote " not escaped"; // why is the comment not gray? we need another "
char badString2 = "double quote /" badly escaped"; // with the wrong slash "
… if you provide a link to said tutorial along with that statement, we could see whether a backslash or a forward slash was used