I'm trying to count characters in a text file, while excluding \r and \n. I opened the file in binary mode. If I use Char == '\r' || Char == '\n' to count those escape characters it works fine. If I use Char != '\r' || Char != '\n' to count everything EXCEPT those escape characters it doesn't work. Here's my code with Char == '\r' || Char == '\n'.
> if(OTP_InputChar != '\r' || OTP_InputChar != '\n')
If it equals \r, then it has to be != to \n
One way or another, this is always true.
In order for this to be false, the char has to be both \r and \n at the same time (not going to happen).
The inverse of if(OTP_InputChar == '\r' || OTP_InputChar == '\n')
is if(!(OTP_InputChar == '\r' || OTP_InputChar == '\n'))
or if(OTP_InputChar != '\r' && OTP_InputChar != '\n')