Unable to login using fstream
I am learning C++ programming language. Using fstream I have created one login program. In this program I store my all data in a text file. When I open that file I see somewhat like:
usernameassword:level
when I tried to get back the data from this file I get following error.
ifstream login(FileName);
login >> username >> password >> level; I will unable to get appropriate result. I get following result.
Username = usernameassword:level
password = null
level = null
I do not understand why I not able to login using fstream. Any help would be highy appericated.



assword:level
Reply With Quote
Copyright Techfuels
Bookmarks