title: How to get a space character in a file in c++ without getline
body: <p>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.</p>