Hello I am parsing text and using strtok() to do so. I am not sure how to include a ‘\’ in my delimiters as C sees anything after this char as code.
char delims[] = "\n !@#$%^&*)(_+-=][}{|:;'<>?,./""";
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll need to use an escape sequence for this. Escape sequences always start with a ‘
\‘, and have one or more characters that follow.In your example, you’re after ‘
\\‘.See this article on MSDN for more information about escape sequences: http://msdn.microsoft.com/en-us/library/h21280bw%28v=vs.80%29.aspx