Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c++ introduction: self study

Tags:

c++

I got help for my program for the following code. I is working, thank you to 'paxdiablo'. It is still showing the '\' character in the result. How can I fix it? (not sure how to reply 'paxdiablo' to sya thanks.

if (strchr (",.();:-\"&?%$![]^@~`{}_<>/#*_+=", curChar) != NULL)//new change
{
   paragraph.erase(subscript, 1);
   numWords-=1;
}
else 
   subscript+=1;

}
like image 323
Luckwhy Avatar asked Dec 19 '25 04:12

Luckwhy


1 Answers

Not a C expert but try escaping the \

if (strchr ("\\,.();:-\"&?%$![]^@~`{}_<>/#*_+=", curChar) != NULL)//new change
like image 57
Andrew Revak Avatar answered Dec 20 '25 22:12

Andrew Revak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!