A note: The reason that I originally thought that you are dealing
with a binary file is that you opened it with
Code:
fstream obj1("login.txt",ios::in|ios::binary);
Why, since this is not a binary file? It won't do any harm here,
but is misleading to future code maintainers. (And this should
be a consideration for all programs.)
Dave