I want to remove all special characters from a string. Allowed characters are A-Z (uppercase or lowercase), numbers (0-9), underscore (_), white space ( ), pecentage(%) or the d
The first approach seems correct, except that you have a | (bitwise OR) instead of a || before c == '.'.
|
||
c == '.'
By the way, you should state what doesn't work (doesn't it compile, or does it crash, or does it produce wrong output?)