Reading from the standard when using ios :: binary

I am trying to read from standard input and distinguish each character from each other by its decimal value. From what I understand, Line Feed (10) and carriage return (13) will be interpreted as the same character. I want to distinguish between them. I know, if I were reading from a file, I could open it using the ios :: binary parameter. But what about if I read from standard input?

+6
source share
1 answer

You can read from std :: cin using get. This method is specifically designed to read raw data ( see Document )

+2
source

Source: https://habr.com/ru/post/921628/


All Articles