I was using c++ and reading a file character by character. I did that using >> operator. But when space comes up it will display wrong because in that case it won’t take that input. So, how can I get a space character and that too without using getline.
Share
You can use std::istreambuf_iterator:
You’ll get better performance if you open the file in binary mode, read it whole at once in a buffer and then work on that: